movine 0.1.0

A simple database migration manager
# Movine notes

## Migration Statuses
- Applied: Migration is locally available and has been run on the database
- Pending: Migration is locally available and has not been run on the database
- Variant: Migration of the same name is locally available, but a different hash has been run on the database
- Divergent: No migration of that name is locally available, but it has been run on the database

TODO: How do we keep track of irreversible migrations? ie. ones with no down.sql?

## Handling of Migrations

### Dealing with Applied/Pending

When all of the migrations are either applied or pending, the migration plan is very straightforward.
- Up will run pending migrations
- Down will rollback applied migrations.
- Fix will do nothing
- Redo will run down & then up on an applied migration

### Dealing with Variant

- Up will ignore variant migrations
- Down will rollback variant migrations using the database down.sql, and complain if that sql doesn't exist. --force will use the fallback local sql to rollback a variant migration.
- Fix will rollback all variant migrations and then run everything up using local migrations.
- Redo will rollback variant with db sql, and run up with local sql.

### Dealing with Divergent
- Up will ignore divergent migrations
- Down will either ignore divergent or not ignore them, depending on flags. --ignore-divergent --not-ignore-divergent
- Fix will rollback all divergent migrations
- Redo will either ignore divergent or error, depending on flags.