Commit Graph

14 Commits

Author SHA1 Message Date
Dmitriy Pleshevskiy f98dd4f0c8 feat: single transaction
I added a single transaction option for apply, upgrade, and
downgrade commands, which wraps all migrations into a single
transaction. This gives you the ability to safely roll up
migrations and, if some unforeseen situation occurs, roll them back.

Unfortunately if there is an error in syntax, mysql will not
rollback the migration and commits automatically :( I will
research this issue.

Closes #2
2021-04-24 01:58:19 +03:00
Dmitriy Pleshevskiy 8f06b69f5d feat: apply multiply files
Closes #3
2021-04-09 01:09:51 +03:00
Dmitriy Pleshevskiy 07d17c9e93 refac: preparatory work for subsequent changes
Moved the main logic such as running a command or getting a config
into it.

Changed incoming paramenters for commands.
2021-04-08 01:50:51 +03:00
Dmitriy Pleshevskiy f4539f7877 feat: add command to upgrade command
... which adds the possibility to specify the number of
existing migrations to be updated
2021-02-25 00:56:08 +03:00
Dmitriy Pleshevskiy bd57c75dfc feat: add config to upgrade command
... which adds the possibility to pass a specific migration
name to be updated
2021-02-25 00:47:16 +03:00
Dmitriy Pleshevskiy 8aa57a00bc feat: add config to downgrade command
it's new flag --all that rollbacks all applied migrations
from database.
2021-02-25 00:20:44 +03:00
Dmitriy Pleshevskiy fef34be5ac feat: add number to downgrade command config 2021-02-25 00:03:54 +03:00
Dmitriy Pleshevskiy d1d09ac912 feat: add command to gen shell completions 2021-02-23 18:16:26 +03:00
Dmitriy Pleshevskiy 9d3d44dfa1 feat(cli): implement make migration command
chore(deps): add chrono crate
2021-02-03 01:07:26 +03:00
Dmitriy Pleshevskiy 38a18180eb chore(cli): add unimplemented commands 2021-02-02 00:55:41 +03:00
Dmitriy Pleshevskiy d175bfa8f0 feat(cli): add config path option 2021-02-02 00:53:33 +03:00
Dmitriy Pleshevskiy 942edd0f8b feat(cli): add recursive migra config search
... in parent directories
2021-02-01 23:51:25 +03:00
Dmitriy Pleshevskiy 7fa65c8197 feat(cli): add apply command
This command provide a possibility to run sql file by name
in root migra directory
2021-01-31 13:41:15 +03:00
Dmitriy Pleshevskiy 2811b8b293 refac(cli): move opts to separate file 2021-01-31 02:54:27 +03:00