12 Commits

Author SHA1 Message Date
Evgeny Nosov
85ff651ba1 Add ignore_missing parameter 2021-04-08 23:50:39 -07:00
Jonas Platte
501be329e7 Fix docs for cargo sqlx prepare 2021-01-13 23:05:56 -08:00
Joe Grund
3e1da43434 Support workspaces for offline feature
This patch enables having a top-level `sqlx-data.json` file within a
workspace.

It does this by using a full clean / check instead of `cargo rustc`
which fails on a workspace.

A `--merged` flag is introduced to switch to the workspace behavior

Fixes #353.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
2020-12-19 05:17:07 +00:00
sid
f41551f3ad reversible migrations for cli
- adds a -r flag whihc will create a reversible migration
- add revert subcommand, which reverts the last migration
- add --dry-run flag to migration run command, which list the migrations that will be applied
- updates add migration to check if all migration are of same type, i.e cannot mix and match reversible and simple migrations
2020-11-24 16:04:43 -08:00
Ryan Leckey
12da5ba534 fix: usage of migrate::run now takes two parameters 2020-11-12 07:38:54 -08:00
Stuart Hinson
c91eb2b04a use default_value for migrations source 2020-11-12 07:13:01 -08:00
Stuart Hinson
a4729cdcc8 Add source param to command line 2020-11-12 07:13:01 -08:00
Jonas Platte
e00d8aaa5a Bump clap version
This time use an exact version requirement since it would otherwise be
upgraded to later betas automatically.
2020-10-13 10:04:05 -07:00
Kramer Hampton
2e1658e08b feat: adds the setup command to the sqlx-cli
The reset command is the equivalent of `sqlx db create`,
and `sqlx migrate run`.
2020-09-10 21:32:04 -07:00
Kramer Hampton
916f1fccf2 feat: adds the reset command to the sqlx-cli
The reset command is the equivalent of `sqlx db drop`, `sqlx db create`,
and `sqlx migrate run`. Unless the `-y` parameter is specified, it will
prompt confirmation before dropping the database.
2020-09-10 21:32:04 -07:00
Stuart Hinson
2ec5ff06b0 Add --database-url to command line 2020-08-17 20:06:26 -07:00
Ryan Leckey
61e4a4f566 feat: finish v1 of both cli and embedded migrations 2020-07-12 03:43:55 -07:00