pub struct ColumnChanges {
pub nullable: Option<bool>,
pub unique: Option<bool>,
pub auto_increment: Option<bool>,
pub primary_key: Option<bool>,
pub foreign_key: Option<Option<ForeignKeySnapshot>>,
}Expand description
Bundle of constraint-flag deltas for an MigrationOp::AlterColumn.
Each field is Some(new_value) only when that flag changed between the
stored and compiled snapshots; otherwise it stays None.
Fields§
§nullable: Option<bool>New value for the nullable flag, if changed.
unique: Option<bool>New value for the unique flag, if changed.
auto_increment: Option<bool>New value for the auto_increment flag, if changed.
primary_key: Option<bool>New value for the primary_key flag, if changed.
foreign_key: Option<Option<ForeignKeySnapshot>>New foreign-key state. Some(None) means the foreign key was dropped;
Some(Some(fk)) means it was added or replaced.
The serde representation is meant for self-describing, human-readable
formats such as JSON: None omits the field, Some(None) is written as
null, and Some(Some(fk)) as the snapshot. It must not be used with
non-self-describing binary serde formats, because the omitted field
shifts the positions of the following ones. Candid has its own encoding.