• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to setval from migrations????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to setval from migrations????


  • Subject: how to setval from migrations????
  • From: Theodore Petrosky <email@hidden>
  • Date: Thu, 22 Jan 2009 05:56:39 -0800 (PST)

I have a migration that is working perfectly. But I need to set the starting value of a sequence... how can I do this?

I tried to add (before I inserted any rows):

ERXJDBCUtilities.executeUpdate(database.adaptorChannel(),
"SELECT setval('t_plum_job_seq', 1000)");

which works... the sequence is set to the value. however the migration fails with an error:

PSQLException: A result was returned when none was expected.

which causes the _dbupdater transaction to rollback. so the app won't run...

is there a way to do this in the migration or do I have to do this manually?

Ted



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: how to setval from migrations????
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Behaviour of objectsWithFetchSpecification()
  • Next by Date: Re: [OT] ActiveRecord.js
  • Previous by thread: Re: [OT] ActiveRecord.js
  • Next by thread: Re: how to setval from migrations????
  • Index(es):
    • Date
    • Thread