Expand description
This module contains types and traits related to the migration files.
Migrationis the abstract representation of what is built from a migration file.QueryBuilderis the recipe for building the query for a migration.MigrationSourceis the ability to produce the set of migrations, aMigrationSet, for a particular context in order to be ran in that context.MigrationContextis the core type. It has an associatedExecutorand it can produce the migrations from source. Combined, it has the full functionality of the migration tool.
Generally these don’t need to be implemented. Their corresponding derive macros can be used instead.
Structs§
- Applied
Migration - An
AppliedMigrationis the information about a migration that completed successfully and it is also a row in the schema history table. - Migration
Id - Name/version derived from the migration source filename.
- Migration
Set - The
Migrations derived from the files in the source directory that need to be applied. - Query
- A SQL query.
Traits§
- Executor
- The “executor” type for the database backend ultimately responsible for issuing migration and schema history queries.
- Migration
- A single migration in a migration set.
- Migration
Context - The context in which a migration run occurs.
- Migration
Source - A type that is used to collect a
MigrationSet– migrations that are not applied yet – which is used as the input to runner commands. - Query
Builder - A helper trait for
Migration. - Query
Repository - A type that has a library of “administrative” queries that are needed during a migration run.