pub struct TableModification {
pub table_name: String,
pub columns_added: Vec<ColumnInfo>,
pub columns_removed: Vec<ColumnInfo>,
pub columns_modified: Vec<ColumnChange>,
pub pk_changed: bool,
pub old_pk: Option<Vec<String>>,
pub new_pk: Option<Vec<String>>,
pub fks_added: Vec<FkInfo>,
pub fks_removed: Vec<FkInfo>,
pub indexes_added: Vec<IndexInfo>,
pub indexes_removed: Vec<IndexInfo>,
}Expand description
Modifications to an existing table
Fields§
§table_name: StringTable name
columns_added: Vec<ColumnInfo>Columns added in the new schema
columns_removed: Vec<ColumnInfo>Columns removed in the new schema
columns_modified: Vec<ColumnChange>Columns with type or nullability changes
pk_changed: boolWhether the primary key changed
old_pk: Option<Vec<String>>Old primary key columns (if changed)
new_pk: Option<Vec<String>>New primary key columns (if changed)
fks_added: Vec<FkInfo>Foreign keys added
fks_removed: Vec<FkInfo>Foreign keys removed
indexes_added: Vec<IndexInfo>Indexes added
indexes_removed: Vec<IndexInfo>Indexes removed
Implementations§
Source§impl TableModification
impl TableModification
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are any modifications
Trait Implementations§
Source§impl Debug for TableModification
impl Debug for TableModification
Auto Trait Implementations§
impl Freeze for TableModification
impl RefUnwindSafe for TableModification
impl Send for TableModification
impl Sync for TableModification
impl Unpin for TableModification
impl UnwindSafe for TableModification
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more