On 8-Aug-09, at 2:36 PM, David LeBer wrote:


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.

Oh, wait...

Has the schema already been changed or are you relying on migrations to do that for you?

If the schema has already been changed then you just need to adjust your model and EOgenerate the classes. You can add the migrations if you want to (and update the _dbupdater version value so they do not run) but if you are not responsible for maintaining the schema there is little value in that.


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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com

This email sent to [email protected]

;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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to