Migration/Frontbase Implementation Question
Migration/Frontbase Implementation Question
- Subject: Migration/Frontbase Implementation Question
- From: Kevin Windham <email@hidden>
- Date: Sat, 14 Feb 2009 12:56:00 -0600
I was going through part two of the WO Podcast that David LeBer did, and I noticed a difference in the way his code worked with MySQL and mine worked with FrontBase.
In the second migration there is a bit of code that adds some groups and some users into the DB. In one of the lines the user table is updated to include a foreign key for the relationship to the group table.
table = database.existingTableNamed("t_user"); table.newIntegerColumn("c_group_id", true);
In David's code the allows null for that second line is false, instead of true. I had to change it to true in order for the migration to complete. I think the reason was that FrontBase was enforcing the constraint on the one existing user in the table and since the column is empty on creation it threw an error. Changing that parameter to true allowed the migration to complete.
Did I miss something in following the tutorial, or is this just a difference in how the DBs operate. Is this something that will need to be handled on a case by case basis, and if so how do you account for scenarios where you might need to run an app on multiple DBs, or move from one DB to another?
Thanks, Kevin
P. S. Is there a part three? I think David did a really good job on these and I would love to see more. I had no idea some of the features in the tutorial were available. |
_______________________________________________
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