Module backup

Module backup 

Source
Expand description

Backup utilities for safe migrations.

Provides pre-migration impact analysis and snapshot creation.

Structs§

MigrationImpact
Impact analysis result for a migration command

Enums§

MigrationChoice
User choice for migration
SnapshotType
Snapshot type for different backup scenarios

Constants§

DATA_SNAPSHOTS_SCHEMA
Schema for data snapshots table (QAIL format)

Functions§

analyze_impact
Analyze the impact of a migration command
backup_columns
Backup specific columns from a table
backup_table
Backup a table to CSV file using COPY protocol (AST-native)
create_db_snapshots
Create database snapshots for all destructive operations (Phase 2)
create_snapshots
Create snapshots for all destructive operations
data_snapshots_ddl
Generate data snapshots table DDL
display_impact
Display impact analysis to user
ensure_snapshots_table
Ensure data snapshots table exists
list_snapshots
List available snapshots for a migration version
prompt_migration_choice
Prompt user for migration choice
restore_column_from_db
Restore column data from database snapshot
snapshot_column_to_db
Create database-stored snapshot for a dropped column (Phase 2)
snapshot_table_to_db
Create database-stored snapshot for a dropped table (Phase 2)