yoonka / migresia

A simple Erlang tool to automatically migrate Mnesia databases between versions
BSD 2-Clause "Simplified" License
25 stars 6 forks source link

Don't rollback migrations already rolled back #3

Closed amiramix closed 8 years ago

amiramix commented 9 years ago

When rolling back migresia lists all migrations, then executes down in those of which timestamp is higher than the specific timestamp to rollback to. This doesn't take into account schema_migrations table, which means the same migration can be rolled back multiple times. This should work similarly to up, once a migration is applied it's not taken into account when calling migrate subsequently.

amiramix commented 8 years ago

Fixed with 971a02b32161035c46f676d706f44da84a98c027 Add rollback_last/0, fix #2 Don't rollback migrations already rolledback