Posted almost 12 years ago. Visible to the public.
Migrate or revert only some migrations
To only run the next two migrations:
Copyrake db:migrate STEP=2
To revert the previous two migrations:
Copyrake db:rollback STEP=2
To revert the last two migrations and then migrate to the most current version:
Copyrake db:migrate:redo STEP=2
To migrate to a given migration number, regardless of whether that means migrating up or down:
Copyrake db:migrate VERSION=20100627185630
To migrate exactly one individual migration out of the sequence* (careful):
Copyrake db:migrate:up VERSION=20100627185630
To revert exactly one individual migration out of the sequence* (careful):
Copyrake db:migrate:down VERSION=20100627185630
*) These migrations must (not) have been processed before (contained/not contained in the schema_migrations
table) or nothing will happen.
Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).