Crate refinery_core
source ·Re-exports§
pub use crate::error::Error;
pub use crate::traits::async::AsyncMigrate;
pub use crate::traits::sync::Migrate;
pub use rusqlite;
pub use postgres;
pub use mysql;
pub use tokio_postgres;
pub use mysql_async;
pub use tiberius;
Modules§
Structs§
- Represents a schema migration to be run on the database, this struct is used by the
embed_migrations!
macro to gather migration files and shouldn’t be needed by the user - Struct that represents the report of the migration cycle, a
Report
instance is returned by theRunner::run
andRunner::run_async
methods viaResult
<Report, Error>
, on case of anError
during a migration, you can access theReport
withError.report
- Struct that represents the entrypoint to run the migrations, an instance of this struct is returned by the
embed_migrations!
macro.Runner
should not need to be instantiated manually
Enums§
- enum containing the migration types used to search for migrations either just .sql files or both .sql and .rs
- An enum set that represents the target version up to which refinery should migrate, it is used by Runner
Functions§
- find migrations on file system recursively across directories given a location and MigrationType
- Loads SQL migrations from a path. This enables dynamic migration discovery, as opposed to embedding. The resulting collection is ordered by version.
- Parse a migration filename stem into a prefix, version, and name.