- Use the correct signature for new migrations.
- Added
prettyplease
for formatting generated code.
- Updated dependencies, notably sqlx
0.7
and clap4
for the CLI. - Reworked some of the traits and internals due to the changes in sqlx
0.7.0
. - Reworked API so that migrations receive a
&mut MigrationContext
without additonal lifetimes. This required that we manage our own transactions instead of using sqlx's own transaction type. - Added the
state
crate for context "extension" management instead of custom type-map implementation. - Removed all
unsafe
code as it is not needed anymore.
- Instead of
Transaction
, aMigrationContext
is passed to the migration functions. It is now possible to provide contextual information to migrations, allowing for customizing migrations e.g. for use in multi-tenant environments. - The way checksums are calculated has changed, since migration files are just ordinary rust code running rustfmt could change the checksum of migrations even if the queries were unchanged. Currently only the executed or prepared SQL queries are taken into account which will not change with formatting. The checksums for pure SQL migrations is unchanged.
- The library now uses unsafe to mask lifetimes so that the migration functions could be ergonomic. The unsafe blocks are all checked and documented, unfortunately testing with miri is not yet possible.
dotenv
dependency was replaced withdotenvy
- The
validate-sql
feature has been removed.
- Bumped sqlx to
0.6.0
.
- Added Sqlite support
- Removed
sqlx/runtime-tokio-rustls
CLI feature dependency
- Relaxed dependency version requirements
- Support loading
.env
in the CLI.
- Show feature flags in rustdoc
- fixed crates.io categories
- Ability to log SQL queries in the CLI
- Ability to check/validate migrations in the CLI
- Optional SQL validation during code generation
- Added "revertible" as a more correct alias where the term "reversible" is used
Initial versions