Skip to main content

Crate siderite_migrations

Crate siderite_migrations 

Source
Expand description

Django-inspired schema migrations for siderite.

See docs/MIGRATIONS.md for the file format, reversibility table and SQLite rebuild caveat.

Re-exports§

pub use autodetector::RenameHints;
pub use autodetector::diff;
pub use autodetector::diff_with;
pub use cli::ExitCode;
pub use cli::make_migrations;
pub use cli::run;
pub use error::MigrationError;
pub use executor::LockHolder;
pub use executor::HISTORY_TABLE;
pub use executor::MigrationIntent;
pub use executor::Migrator;
pub use executor::RecoveryEntry;
pub use executor::RecoveryReport;
pub use executor::Report;
pub use loader::MigrationGraph;
pub use loader::load_dir;
pub use loader::write_migration;
pub use migration::Migration;
pub use operation::Operation;
pub use registry::MigrationRegistry;
pub use state::ConstraintState;
pub use state::DbDefault;
pub use state::FieldState;
pub use state::ForeignKeyState;
pub use state::IndexState;
pub use state::ModelState;
pub use state::OnDelete;
pub use state::ProjectState;
pub use state::SqlType;

Modules§

autodetector
Deterministic schema diff: diff compares two ProjectStates.
cli
Reusable command runner (makemigrations, migrate, rollback, showmigrations, squashmigrations).
error
Errors raised by the migration loader, autodetector, executor and CLI.
executor
Apply and reverse migrations against a siderite_orm::Db.
loader
Load, validate and write JSON migration files.
migration
A single migration file: id, dependencies, operations, checksum.
operation
Schema operations recorded in a migration file.
registry
Runtime registry of crate::operation::Operation::RunRust functions.
schema_editor
DDL generation for PostgreSQL, SQLite and MySQL.
squash
Collapse a contiguous range of migrations into one.
state
Owned, serializable snapshots of model metadata.