- Use the correct signature for new migrations.
- Added
prettypleasefor formatting generated code.
- Updated dependencies, notably sqlx
0.7and clap4for 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 MigrationContextwithout additonal lifetimes. This required that we manage our own transactions instead of using sqlx's own transaction type. - Added the
statecrate for context "extension" management instead of custom type-map implementation. - Removed all
unsafecode as it is not needed anymore.
- Instead of
Transaction, aMigrationContextis 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.
dotenvdependency was replaced withdotenvy- The
validate-sqlfeature has been removed.
- Bumped sqlx to
0.6.0.
- Added Sqlite support
- Removed
sqlx/runtime-tokio-rustlsCLI feature dependency
- Relaxed dependency version requirements
- Support loading
.envin 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