db-migrate / node-db-migrate

Database migration framework for node
Other
2.32k stars 360 forks source link

Down/rollback a specific migration? #672

Closed aprilmintacpineda closed 4 years ago

aprilmintacpineda commented 4 years ago

I'm submitting a...

Current behavior

Docs doesn't mention how to rollback a specific migration.

Expected behavior

There should be a way to rollback specific migration(s).

Environment

db-migrate version: ^0.11.6 db-migrate driver with versions: db-migrate-mysql^2.1.0

Additional information:

aprilmintacpineda commented 4 years ago

I tried running npx db-migrate down 20200229212850-my-migration because in up it said I can do db-migrate up 20150207135259-myFancyMigration so I though I could do the same with down, but the behavior I got was unexpected. I rolled back 5 migrations.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

aprilmintacpineda commented 4 years ago

Don't!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

aprilmintacpineda commented 4 years ago

Don't you dare.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tomsiwik commented 4 years ago

Nice. I need this behaviour too and/or invalidating single migrations rather than whole sequences. Stale-bot > People