I am currently re-designing a legacy (Rails) app data schema into a new Rails app. What I have to do is :
- 1 Migration : create new fields in several tables, add new ones
- 1 Rake task : dispatch legacy fields values into newly created tables fields
- 1 Migration : delete unused fields, delete some legacy tables
Actually it works, but is it possible to "mix" these 2 migrations + rake task into one single script ? Is there really no other solution than running 3 scripts, one by one ? (the dispatching rake task takes up to 10 minutes).
I would really prefer to "shoot and forget" only one command line when I'll be deploying to production, moving from the old app to the new one.