Skip to main content

Crate sqlx_migrator

Crate sqlx_migrator 

Source
Expand description

Library to create sqlx migration using rust code instead of sql.

Check README.MD for more detailed information of how to use a crate and visit Operation, Migration and Migrator

Modules§

clicli
Module for creating and running cli with help of migrator
error
Module for library error
migration
Module for defining the Migration trait, which represents a database migration.
migrator
Migrator module
operation
Module for defining the Operation trait
sync
Module which is used to sync a external migration schema to sqlx_migrator sqlx migration

Macros§

any_migrationany and (mysql or postgres or sqlite)
Macro for implementing the migration macro for the Any.
migration
Macro for implementing the Migration trait for the provided database.
mysql_migrationmysql
Macro for implementing the migration macro for the MySql.
postgres_migrationpostgres
Macro for implementing the migration macro for the Postgres.
sqlite_migrationsqlite
Macro for implementing the migration macro for the Sqlite.
vec_box
Macro for vector of Box

Structs§

MigrationCommandcli
Migration command for performing rust based sqlx migrations
Migrator
A struct that stores migration-related metadata, including the list of migrations and configuration such as table and schema name
Plan
Struct that determines the type of migration plan to execute.

Enums§

Error
Error enum to store different types of error

Traits§

Info
The Info trait provides database-agnostic methods for managing migrations and interacting with migration states.
Migrate
The Migrate trait defines methods to manage and apply database migrations according to a given plan.
Migration
Trait representing a database migration.
OldMigrator
Trait which is implemented for syncing a migration from old migrator to new migrator
Operation
Trait representing a database migration operation.
Synchronize
Trait which is implemented for syncing a migration from old migrator to new migrator for a specific database