Re: when db schema changes... al goes wrong
Re: when db schema changes... al goes wrong
- Subject: Re: when db schema changes... al goes wrong
- From: David LeBer <email@hidden>
- Date: Sat, 8 Aug 2009 14:36:59 -0400
On 8-Aug-09, at 2:01 PM, Gustavo Pizano wrote:
Hello, long time without posting any question, I was assigned a
iphone project, and now back to WO.
Here at work decided to change the db schema, and add some more
table and relationships, but they are not new apart from the ones I
had already, they actually will touch the schema I was working on
and the logic I was working with.
So, pain in the behind!!!! for me.
Im using migrations, this should work for something no?, when I
create the new migration page then it complains that everything
already exists!, and I can't delete anything otherwise.. all data
goes to hell.
then I dunno if my design is that poor or what but I will have to
touch the components that were doing something in the db in that
specific area that its gonna be modified... so to keep avoiding this
problems inthe future what suggestions you may have for me....
I wanna cry I have to arrive on monday and start working on those
changes, I was just todl today that they are waiting for me... great
bday present I will have at the office on monday,
Each migration is a delta between the current state of the database
and the previous state of the database.
In your myModelMigration0.java the migration includes everything to
build the schema to step 0 (since nothing existed before).
In your myModelMigration1.java include only the additions to the
schema necessary to build to step 1 (since step 0 is already completed).
In your myModelMigration2.java include only the additions to the
schema necessary to build from step 1 to step 2 (since step 1 is
already completed).
...
In your myModelMigrationN.java include only the additions to the
schema necessary to build from step N-1 to step N (since step N-1 is
already completed).
hth.
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
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