Crate dbmigrate_lib

Source
Expand description

Database migrations for Postgres, MySQL, and SQLite.

Modules§

errors
All possible errors

Structs§

Migration
A migration has 2 files: one up and one down
MigrationFile
A single direction migration file
MysqlDriver
The MySQL driver
PostgresDriver
The PostgreSQL driver
SqliteDriver
The SQLite driver

Enums§

Direction
A migration direction, can be Up or Down

Traits§

Driver
The common trait that all databases need to implement in order for migrations to work

Functions§

create_migration
Creates 2 migration file: one up and one down
get_driver
Returns a driver instance depending on url
read_migration_files
Read the path given and read all the migration files, pairing them by migration number and checking for errors along the way

Type Aliases§

Migrations
Simple way to hold migrations indexed by their number