Dmitriy Pleshevskiy
c20f3c3411
fix: supports old sqlite version in downgrade
2021-05-17 10:51:53 +03:00
Dmitriy Pleshevskiy
97178fcb02
feat: add sqlite client
2021-05-17 10:06:33 +03:00
Dmitriy Pleshevskiy
7ae88ce3d3
chore: return new fn for migration manager
2021-05-16 17:01:41 +03:00
Dmitriy Pleshevskiy
285d1778b4
style: move migra toml constant
2021-05-16 16:57:20 +03:00
Dmitriy Pleshevskiy
def6534fd1
feat: add date format option
2021-05-16 16:55:59 +03:00
Dmitriy Pleshevskiy
11874bd8a4
feat: add migrations config to manifest
...
- added migrations directory path
- added migrations table name
2021-05-16 16:39:24 +03:00
Dmitriy Pleshevskiy
83a4155d76
refac: add migrations table name to manifest
2021-04-26 12:18:12 +03:00
Dmitriy Pleshevskiy
eef7980222
chore: cosmetic changes
2021-04-24 23:16:30 +03:00
Dmitriy Pleshevskiy
20e00c3579
chore: fix clippy warnings
2021-04-24 22:48:10 +03:00
Dmitriy Pleshevskiy
7ae5eec2c3
chore: add support transactional ddl for client
...
I didn't know that mysql doesn't support transactional ddl.
It means that we cannot create table, alter table and etc. in
transaction. At the moment migra supports only postgres client,
that can be use transaction for ddl.
2021-04-24 22:39:44 +03:00
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
244a758154
chore: remove dbg
2021-04-09 23:08:16 +03:00
Dmitriy Pleshevskiy
8f06b69f5d
feat: apply multiply files
...
Closes #3
2021-04-09 01:09:51 +03:00
Dmitriy Pleshevskiy
155b2e6aa2
Merge pull request #5 from pleshevskiy/task-3
...
refac: preparatory work for sebsuquent changes
2021-04-08 19:51:48 +02: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
e81298d1ba
chore: move db statements to another trait
2021-04-08 00:49:38 +03:00
Dmitriy Pleshevskiy
18bf265510
feat: add mysql database supporting
2021-03-26 02:10:41 +03:00
Dmitriy Pleshevskiy
a29c65a9a7
fix: find exists manifest
2021-03-25 00:41:22 +03:00
Dmitriy Pleshevskiy
11c374e7b0
feat: add transaction manager
...
now we change database only in transaction
2021-03-02 00:44:57 +03:00
Dmitriy Pleshevskiy
9e5c2192d4
feat: add dotenv to load migra config
2021-02-26 01:21:29 +03:00
Dmitriy Pleshevskiy
b240db862d
refac: rename io kind in error enum
2021-02-25 12:25:14 +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
e06d1c0a49
refac: rename variables in migration structure
2021-02-23 18:55:12 +03:00
Dmitriy Pleshevskiy
eb0775e35d
refac: restructure database
2021-02-23 18:44:37 +03:00
Dmitriy Pleshevskiy
d1d09ac912
feat: add command to gen shell completions
2021-02-23 18:16:26 +03:00
Dmitriy Pleshevskiy
f4ad03cee0
refac: use join instead path builder
2021-02-22 23:13:50 +03:00
Dmitriy Pleshevskiy
dbc7ddadb7
refac: made the error object simpler
2021-02-22 23:06:08 +03:00
Dmitriy Pleshevskiy
6b352c31a2
chore: print to stdout in make command
...
... about successfully created directory with structure for
migration
2021-02-21 23:35:59 +03:00
Dmitriy Pleshevskiy
fb86640cbb
chore: add badges to readme
2021-02-21 18:22:00 +03:00
Dmitriy Pleshevskiy
7d631b1d24
fix: future clippy warnings
2021-02-21 17:53:43 +03:00
Dmitriy Pleshevskiy
51f631d900
chore: add tests for init command
2021-02-20 23:07:40 +03:00
Dmitriy Pleshevskiy
a5b3d33bef
chore: split tests for...
...
merge query with params function
2021-02-20 22:31:59 +03:00
Dmitriy Pleshevskiy
a4d8218307
fix: applied migration names from query response
2021-02-19 22:37:27 +03:00
Dmitriy Pleshevskiy
7bd4f3d1f9
fix: merge query with params
2021-02-19 22:20:48 +03:00
Dmitriy Pleshevskiy
a7ab5572df
refac: add database connection manager
...
feat: add supported client to manifest
2021-02-18 12:29:13 +03:00
Dmitriy Pleshevskiy
d4106c50e6
refac: move postgres initialization to separate dir
2021-02-16 18:11:39 +03:00
Dmitriy Pleshevskiy
9679519380
refac: remove unused vars
2021-02-15 23:23:35 +03:00
Dmitriy Pleshevskiy
92c07f4181
refac: remove stmt constants from manager trait
2021-02-15 23:22:13 +03:00
Dmitriy Pleshevskiy
33f392e18e
refac: add additional trait for migration names
2021-02-15 13:47:45 +03:00
Dmitriy Pleshevskiy
109c9ce52f
refac: add migration manager
2021-02-15 13:06:09 +03:00
Dmitriy Pleshevskiy
1b16aff6e5
refac: rename database connection to postgres
2021-02-14 12:10:12 +03:00
Dmitriy Pleshevskiy
481760ee6e
refac: add trait for upgrade and downgrade
2021-02-14 00:03:37 +03:00
Dmitriy Pleshevskiy
1d8993d1f0
refac: rename method
...
... to open database connection
2021-02-13 23:46:21 +03:00
Dmitriy Pleshevskiy
8f834264d8
refac: add struct for db connection
2021-02-13 23:44:41 +03:00
Dmitriy Pleshevskiy
40c0a43dab
refac: move commands to separate folder
2021-02-13 00:39:39 +03:00
Dmitriy Pleshevskiy
ba73786a38
feat(cli): add error struct
2021-02-12 01:25:28 +03:00
Dmitriy Pleshevskiy
db631fddd2
refac(cli): move migration struct to another file
2021-02-08 23:42:13 +03:00