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.
Implementations§
Trait Implementations§
Source§impl Clone for ColumnChanges
impl Clone for ColumnChanges
Source§fn clone(&self) -> ColumnChanges
fn clone(&self) -> ColumnChanges
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnChanges
impl Debug for ColumnChanges
Source§impl Default for ColumnChanges
impl Default for ColumnChanges
Source§fn default() -> ColumnChanges
fn default() -> ColumnChanges
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColumnChanges
impl<'de> Deserialize<'de> for ColumnChanges
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ColumnChanges
impl PartialEq for ColumnChanges
Source§impl Serialize for ColumnChanges
impl Serialize for ColumnChanges
impl Eq for ColumnChanges
impl StructuralPartialEq for ColumnChanges
Auto Trait Implementations§
impl Freeze for ColumnChanges
impl RefUnwindSafe for ColumnChanges
impl Send for ColumnChanges
impl Sync for ColumnChanges
impl Unpin for ColumnChanges
impl UnsafeUnpin for ColumnChanges
impl UnwindSafe for ColumnChanges
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