Re: Executing simple one-time tasks using EOF
Re: Executing simple one-time tasks using EOF
- Subject: Re: Executing simple one-time tasks using EOF
- From: Paul Hoadley <email@hidden>
- Date: Sun, 29 Jun 2014 08:51:01 +1000
On 29 Jun 2014, at 8:04 am, Miguel Arroz <email@hidden> wrote:
Can't you use Wonder migrations? I have the vague recollection I did that on a past life for doing tasks like that. AFAIK there were two methods you could define on a migration, the first before EOF loaded the models, and the second one after. But I don't touch that for quite some time now, so I may be confused.
Yeah, I’ve certainly been known to do some one-time EOF-related tasks in a migration class—you can leave upgrade() and downgrade() empty, make sure you implement IERXPostMigration, and run the code in postUpgrade(). As for how dirty that makes you feel, I guess it’s a case-by-case basis. I’ve justified it from time to time because the postUpgrade() one-time tasks were model-related, and didn’t feel like a terrible abuse of migrations. YMMV.
|
_______________________________________________
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