This project is archived and is in readonly mode.
negative migration version
-
keymone
- Tag changed from 2.3.x, active_record, migrator to 2.3.x, active_record, migrator, patch
-
Michael Koziarski
don't we already have db:migrate:down VERSION=...?
-
keymone
we do, but we still have to type full version number like 200910xxxxxxx and looking up for that number each time i do downgrades really frustrates me (even though i do not downgrade very frequently) and
rake db:migrate VERSION=-1makes me feel happy
-
Michael Koziarski
It just seems a little terse to me.
Could we fix it by simply making sure db:migrate:down has sensible defaults?
-
keymone
the only sensible default for db:migrate:down i can think of is to downgrade to previous version however if you want to downgrade 2 or 3 versions you still have to lookup for correct version number
one more thing i noticed when downgrading using full version number - everytime i stop and think what exactly rake db:migrate:down VERSION=xxxxxx means? will it revert all migrations including xxxxxx nor will it leave database alone at that point? it is not a problem but it does confuse me sometimes on the other hand when i type VERSION=-5 i know it will revert exactly 5 migrations.
-
José Valim
Isn't db:rollback STEP=N used for this purpose?
-
Dan Pickett
- Tag changed from 2.3.x, active_record, migrator, patch to 2.3.x, active_record, bugmash, migrator, patch
-
Jeff Kreeftmeijer
-1
Like José said, we have
rake db:rollback STEP=nfor this. I could be completely missing something though.
Also, I don't really like theVERSION=-nsyntax. -
Anil Wadghule
-1 Not a necessary feature. VERSION value should only be timestamp or migration number. VERSION as count is confusing.
-
keymone
yes, db:rollback is what i failed to find in the first place.
-
Jeff Kreeftmeijer
Cool, this one can be closed then. :)
-
José Valim
- Tag changed from 2.3.x, active_record, bugmash, migrator, patch to 2.3.x, active_record, migrator, patch
- State changed from new to invalid
