3 Commits

Author SHA1 Message Date
Austin Bonander
3765f67aba feat: introduce migrate.create-schemas 2025-01-22 15:32:50 -08:00
Austin Bonander
45c0b85b4c feat: teach sqlx-cli about migrate.table-name 2025-01-22 14:24:18 -08:00
Ameer Ghani
84f21e99ef
cli: add --target-version CLI flags for migrate run/revert (#2538)
* cli: add --target-version CLI flags for migrate run/revert

* cli: fix broken test

* cli: test harness for `sqlx migrate` along with --target-version tests

* cli: Fail if version supplied to run/revert is too old/new

After some discussion with my coworkers, we thought about the behavior a bit more:

The behavior is now that for a run, if the provided version is too old, the CLI
will return with failure rather than being a no-op. This gives feedback to the
operator instead of being quiet.

It is still valid to up/downgrade to the latest version, this will still be a no-op
to allow for idempotency.
2023-07-31 12:49:53 -07:00