* 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.
* Separate offline query metadata per crate
* Update sqlx-cli prepare to use separate query metadata per crate
* Add resolve.root to metadata test fixture
* Simplify root package resolution
* Fix prepare --merged
* refactor(sqlx-cli): Try avoiding a full clean with `--merged`
* docs(sqlx-cli): Sprinkle some comments on the metadata changes
* refactor(sqlx-cli): Make the new recompiltion setup unit-testable
* fix(sqlx-cli): Only pass in `$RUSTFLAGS` when set when using `--merged`
* refactor(sqlx-cli): `cargo clean -p` works by name so rip out pkgid code
* chore(sqlx-cli): Remove unused imports