This is database migration tool inspired by Ruby on Rails Active Record Migrations.
- Check if database has tables with name "__MoveVesions" and "__MoveLog" if not exit and propose to init ( this behaviour is fool protection if database name is incorrect )
- Get version for migration name (migration name is ability to use few migration sequences in single database, however, I am not sure if this is not overcomlication) Possible that this stuff also need fool prof.
- Ensure all steps after last version.
- Execute discovered steps if any. Each step executed separatelly and advances version according to the executed step.
- If something failed, rollback current step
- Should check "__MoveVersions" table and current version for migration. Display all available information.
- If config is correct should find all penfing steps. And display all applicable information.
- Possible show last migration date.
- Should check and create tables "__MoveVesions" and "__MoveLog" (if not exists)
- Should add record to __MoveVesions with migration sequence name and version "0"
- Steps should be indempotent as much as possible
- Steps should implement rollback (or at least try to do so)
- Rollback should be designed in exception less maner. For example AddTable should not fail if table does not exist