Skip to main content

type_bridge_migration/
lib.rs

1//! Migration specification IR for type-bridge.
2//!
3//! This crate defines the serde contract that Python migration authoring lowers
4//! into, plus pure validation, checksum gates, the transaction-aware planner,
5//! and the async executor that runs each step over a `Database`.
6
7#![warn(missing_docs)]
8
9pub mod author;
10pub mod backfill;
11pub mod checksum;
12pub mod error;
13pub mod executor;
14pub mod graph;
15pub mod loader;
16pub mod plan;
17pub mod recovery;
18pub mod spec;
19pub mod state;
20
21#[cfg(test)]
22pub(crate) mod testing;
23
24pub use author::map_schema_diff;
25pub use backfill::{BackfillResult, execute_backfill};
26pub use checksum::{
27    ChecksumDrift, check_checksum_drift, checksum_drift_errors, migration_file_checksum,
28};
29pub use error::{MigrationError, Result};
30pub use executor::{MigrationResult, execute_migration, execute_plan, execute_plan_with_run_log};
31pub use graph::{AppliedMigrationRecord, MigrationValidationError, ValidationCode, validate_graph};
32pub use loader::{load_dir, load_dir_checked, load_sidecar};
33pub use plan::{
34    ExecutionPlan, ExecutionStep, MigrationAction, MigrationExecution, OperationKind, StepKind,
35    plan,
36};
37pub use recovery::{
38    CheckedExecutionPlan, CheckedExecutionStep, CheckedMigrationExecution,
39    CheckedMigrationIdentity, ExecutionStepId, PendingProof, RecoveryExecutionResult,
40    RecoveryFuture, RecoveryMigrationResult, RecoveryMigrationStatus, RecoveryPlanStatus,
41    StepExecutionOutcome, StepExecutionResult, StepRecoveryController, StepRecoveryDecision,
42    StepRecoveryEvent, StepRecoveryEventKind, execute_recovery_plan, plan_recovery,
43    prepare_recovery_plan,
44};
45pub use spec::{MigrationDependencySpec, MigrationGraph, MigrationSpec, OperationSpec};
46pub use state::{
47    InMemoryStateStore, MigrationExecutorInfo, MigrationRunRecord, MigrationStateSchemaKind,
48    MigrationStateStore, TypeDbStateStore, applied_migration_entity_label, collect_executor_info,
49    finished_run_record, is_migration_state_type, migration_state_schema, migration_timestamp_now,
50    started_run_record,
51};