Skip to main content

Crate type_bridge_migration

Crate type_bridge_migration 

Source
Expand description

Migration specification IR for type-bridge.

This crate defines the serde contract that Python migration authoring lowers into, plus pure validation, checksum gates, the transaction-aware planner, and the async executor that runs each step over a Database.

Re-exports§

pub use adoption::LEGACY_ADOPTION_METADATA_V2;
pub use adoption::LEGACY_IGNORED_SOURCE_METADATA_V1;
pub use adoption::LEGACY_SIDECAR_ADOPTION_METADATA_V1;
pub use adoption::LegacyAdoptionHistory;
pub use adoption::LegacyAdoptionMetadata;
pub use adoption::LegacyDirectoryAuthority;
pub use adoption::LegacyDirectoryEntry;
pub use adoption::LegacyIgnoredSourceMetadata;
pub use adoption::LegacyMetadataRevision;
pub use adoption::LegacySchemaEffect;
pub use adoption::LegacySidecarAdoptionMetadata;
pub use adoption::MAX_LEGACY_ARTIFACT_BYTES;
pub use adoption::MAX_LEGACY_DIRECTORY_ENTRIES;
pub use adoption::MAX_LEGACY_HISTORY_BYTES;
pub use adoption::VerifiedLegacyHead;
pub use adoption::load_adoption_history;
pub use adoption::reconstruct_legacy_head;
pub use author::map_schema_diff;
pub use backfill::BackfillResult;
pub use backfill::execute_backfill;
pub use checksum::ChecksumDrift;
pub use checksum::check_checksum_drift;
pub use checksum::checksum_drift_errors;
pub use checksum::migration_file_checksum;
pub use error::MigrationError;
pub use error::Result;
pub use executor::MigrationResult;
pub use executor::execute_migration;
pub use executor::execute_plan;
pub use executor::execute_plan_with_run_log;
pub use graph::AppliedMigrationRecord;
pub use graph::MigrationValidationError;
pub use graph::ValidationCode;
pub use graph::validate_graph;
pub use loader::load_dir;
pub use loader::load_dir_checked;
pub use loader::load_sidecar;
pub use plan::ExecutionPlan;
pub use plan::ExecutionStep;
pub use plan::MigrationAction;
pub use plan::MigrationExecution;
pub use plan::OperationKind;
pub use plan::StepKind;
pub use plan::plan;
pub use recovery::CheckedExecutionPlan;
pub use recovery::CheckedExecutionStep;
pub use recovery::CheckedMigrationExecution;
pub use recovery::CheckedMigrationIdentity;
pub use recovery::ExecutionStepId;
pub use recovery::PendingProof;
pub use recovery::RecoveryExecutionResult;
pub use recovery::RecoveryFuture;
pub use recovery::RecoveryMigrationResult;
pub use recovery::RecoveryMigrationStatus;
pub use recovery::RecoveryPlanStatus;
pub use recovery::StepExecutionOutcome;
pub use recovery::StepExecutionResult;
pub use recovery::StepRecoveryController;
pub use recovery::StepRecoveryDecision;
pub use recovery::StepRecoveryEvent;
pub use recovery::StepRecoveryEventKind;
pub use recovery::execute_recovery_plan;
pub use recovery::plan_recovery;
pub use recovery::prepare_recovery_plan;
pub use spec::MigrationDependencySpec;
pub use spec::MigrationGraph;
pub use spec::MigrationSpec;
pub use spec::OperationSpec;
pub use state::InMemoryStateStore;
pub use state::LegacyCutoverSentinelError;
pub use state::LegacyCutoverSentinelExpectation;
pub use state::MigrationExecutorInfo;
pub use state::MigrationRunRecord;
pub use state::MigrationStateSchemaKind;
pub use state::MigrationStateStore;
pub use state::TypeDbStateStore;
pub use state::VerifiedLegacyAppliedPartition;
pub use state::applied_migration_entity_label;
pub use state::collect_executor_info;
pub use state::finished_run_record;
pub use state::is_migration_state_type;
pub use state::migration_state_schema;
pub use state::migration_timestamp_now;
pub use state::require_legacy_writer_open;
pub use state::require_legacy_writer_open_in_transaction;
pub use state::started_run_record;

Modules§

adoption
Read-only legacy-history evidence used by the V2 adoption checkpoint.
author
Canonical migration authoring core (#166).
backfill
Backfill count derivation for StepKind::Backfill steps.
checksum
Migration checksum calculation and drift detection.
error
Error types for migration IR and validation boundaries.
executor
Async migration executor.
graph
Pure migration graph validation.
legacy_cli
Released V1 command-line parser and command runner.
loader
Native Rust sidecar loader for migration files.
plan
Pure migration planner.
recovery
Fail-closed per-step execution for externally owned migration ledgers.
spec
Serde migration specification types.
state
Migration state backend seam.

Constants§

LEGACY_CUTOVER_SENTINEL_APPLIED_AT
Deterministic TypeDB datetime carried by the V2 cutover sentinel.
LEGACY_CUTOVER_SENTINEL_APP_LABEL
Reserved applied-ledger application label for the V2 cutover sentinel.
LEGACY_CUTOVER_SENTINEL_MIGRATION_ID
Reserved applied-ledger key for the V2 cutover sentinel.
LEGACY_CUTOVER_SENTINEL_NAME
Reserved applied-ledger migration name for the V2 cutover sentinel.
LEGACY_WRITER_CUTOVER_MESSAGE
Stable error text returned when an exact, anchor-bound cutover is observed.