Expand description
This module contains types and traits related to the migration files.
Migration
is the abstract representation of what is built from a migration file.QueryBuilder
is the recipe for building the query for a migration.MigrationSource
is the ability to produce the set of migrations, aMigrationSet
, for a particular context in order to be ran in that context.MigrationContext
is the core type. It has an associatedExecutor
and it can produce the migrations from source. Combined, it has the full functionality of the migration tool.
Generally these shouldn’t be implemented; use the corresponding derive macro instead.
Structs§
- Applied
Migration - An
AppliedMigration
is 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
Migration
s 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.