#[derive(Debug, Clone)]
pub struct Migration {
pub id: String,
pub description: String,
pub up_sql: String,
pub down_sql: String,
}
#[derive(Debug, Clone)]
pub struct ModelSnapshot {
pub migration_id: String,
pub entity_types: Vec<SnapshotEntityType>,
}
#[derive(Debug, Clone)]
pub struct SnapshotEntityType {
pub type_name: String,
pub table_name: String,
pub columns: Vec<SnapshotColumn>,
}
#[derive(Debug, Clone, PartialEq, Default)]
pub struct SnapshotColumn {
pub field_name: String,
pub column_name: String,
pub type_name: String,
pub is_primary_key: bool,
pub is_required: bool,
pub is_foreign_key: bool,
pub max_length: Option<usize>,
pub is_auto_increment: bool,
pub is_sequence: bool,
pub sequence_name: Option<String>,
pub fk_referenced_table: Option<String>,
pub fk_referenced_column: Option<String>,
pub has_index: bool,
pub is_unique: bool,
pub fk_on_delete: Option<String>,
}