This is just for the record. Since my previous reply was bounced because of the wrong sent address.
I also use Theodore's approach at times. I use my approach for more complex initial setups of the reference tables etc. Paul On Dec 16, 2012, at 9:51 AM, Paul Yu <[email protected]> wrote: > Instead of running a second migration. > > What I do is this. At the end of the initial migration .java file, I have > this statement > > > ERXJDBCUtilities.executeUpdateScriptFromResourceNamed(database.adaptorChannel(), > "MigrationScripts/MyModel0_MySQL.migration", "MyModelFrameworkName"); > > Then in the > > MyModelFrameworkName/Resources directory, I create a MigrationScripts > directory and add the file MyModel0_MySQL.migration file. > > In that file, I would have my INSERT statements to set the initial state of > the database. > > Paul > > On Dec 16, 2012, at 9:34 AM, James Cicenia <[email protected]> wrote: > >> I have always created a second migration file with SQL inserts. Haven't >> experienced any problems. >> >> DateModel0 ==> setup tables, etc. >> DateModel1 ==> bootstrap data sql inserts >> >> >> >> On Dec 16, 2012, at 8:23 AM, Flavio Donadio <[email protected]> wrote: >> >>> Hello, people! >>> >>> >>> I think I already know the answer, but I need to check first... >>> >>> I want to create a default user on my WO App when the app is first run. So, >>> I need to create a User entity and insert it right after my tables are >>> created, which is automatically done through a migration. >>> >>> Is it safe to insert my code right after this? >>> >>> userTable.create(); >>> userTable.setPrimaryKey("id"); >>> >>> Or would I need something else? Is this right, optimal and/or safe? >>> >>> >>> Regards, >>> Flavio >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Webobjects-dev mailing list ([email protected]) >>> Help/Unsubscribe/Update your Subscription: >>> https://lists.apple.com/mailman/options/webobjects-dev/james%40jimijon.com >>> >>> This email sent to [email protected] >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com >> >> This email sent to [email protected] >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
