Reputation: 10035
Can someone explain what is the difference between running a rails migration post_restart vs pre_restart? What restart is it referring to? I'm working with the handcuffs gem but not really sure what it does. An example of when to use either phase would be greatly appreciated
Upvotes: 0
Views: 137
Reputation: 8604
These phases just are example, you can define whatever phase you want, example: beta
, production
.
I think the idea is when you defined phase for migrations, you can run migrations of a specify phase instead of running all migrations.
So, If you run rake db:migrate
, it will run all pending migrations, but if you run:
rake 'handcuffs:migrate[beta]'
it will run only pending migrations of beta phase.
Upvotes: 1