Two additional things about doing it in this method is that you have access to EOF so you don't have to use the utilities or raw SQL and it is run at the end of ALL migrations, so you know your database will be completely migrated when your PostMigrations are run.
SecretPal has some nice examples showing its use.
David On 2012-12-16, at 12:45 PM, Johnny Miller < email@hidden> wrote: You can also make your migration file implement: IERXPostMigration
So in your normal migration do your database changes and then in public void postUpgrade(EOEditingContext editingContext, EOModel model) do your inserts.
Aloha,
|
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail
|
|
On Dec 16, 2012, at 4:34 AM, James Cicenia < email@hidden> 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
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
|