Module schema_connector::migrations_directory
source · Expand description
Migrations directory management.
This module is responsible for the management of the contents of the migrations directory. At the top level it contains a migration_lock.toml file which lists the provider. It also contains multiple subfolders, named after the migration id, and each containing:
- A migration script
Structs
- An IO error that occurred while reading the migrations directory.
- Proxy to a directory containing one migration, as returned by
create_migration_directory
andlist_migrations
. - Error while reading a migration script.
Constants
- The file name for the migration lock file, not including the file extension.
- The file name for migration scripts, not including the file extension.
Functions
- Create a directory for a new migration.
- Error if the provider in the schema does not match the one in the schema_lock.toml
- List the migrations present in the migration directory, lexicographically sorted by name.
- Read the provider from the migration_lock.toml.
None
means there was no migration_lock.toml file in the directory. - Write the migration_lock file to the directory.