Crates.io | midas |
lib.rs | midas |
version | 0.5.12 |
source | src |
created_at | 2019-09-04 08:08:27.92683 |
updated_at | 2021-09-05 16:26:31.492686 |
description | Do painless migration. |
homepage | https://github.com/ffimnsr/midas |
repository | https://github.com/ffimnsr/midas |
max_upload_size | |
id | 162089 |
size | 71,497 |
So Midas, king of Lydia, swelled at first with pride when he found he could transform everything he touched to gold; but when he beheld his food grow rigid and his drink harden into golden ice then he understood that this gift was a bane and in his loathing for gold, cursed his prayer.
- from In Rufinem, Claudian
Do painless migrations.
Currently, the only supported database is Postgres
.
Here is a sample command line usage of midas
.
midas --database postgres://postgres@localhost:5432/postgres --source migrations up
or you could also use the cargo migrate
to integrate it on your cargo workflow.
The command will execute all special (up) SQL migrations files to the database.
Here are the available subcommands:
create Creates a timestamped migration file
down Remove all applied migrations
drop Drops everything inside the database
redo Redo the last migration
revert Reverts the last migration
init Setups and creates initial file directory and env
status Checks the status of the migration
up Apply all non-applied migrations
For more info see --help
.
If you're into Rust then you can use cargo
to install.
cargo install midas
Binary for different OS distribution can be downloaded here.
setup
and drop
commands.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.