Re: Migration/Frontbase Implementation Question
Re: Migration/Frontbase Implementation Question
- Subject: Re: Migration/Frontbase Implementation Question
- From: Chuck Hill <email@hidden>
- Date: Fri, 20 Feb 2009 11:56:38 -0800
On Feb 16, 2009, at 8:19 PM, Kevin Windham wrote:
On Feb 16, 2009, at 8:37 PM, Chuck Hill wrote:
On Feb 14, 2009, at 10:56 AM, Kevin Windham wrote:
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?
When the FB database was created, did the FK constraints get marked
as DEFERRED INITIALLY DEFERRED? Are you using the FB plugin from
Wonder? Are you certain?
The database doesn't appear to have been created that way. It
doesn't have any constraints or reference listed on the foreign key.
That seem unlikely given what you said above. Where are you looking?
I don't think I specified any plugin. Would this need to be
specified in the Model and the Properties file for migrations? Do
you always need a plug-in for each DB? I don't recall seeing any for
MySQL in the podcast.
Plugins for some databases are embedded in WebObjects. They are used
automatically. Plugins for additional database are available from
various third party sources. Replacement / extension plugins are
available for some databases, most of these are in Project Wonder.
Non-standard plugs can be configured in the connection dictionary of
each model.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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