pub enum Change {
AddTable(Table),
DropTable {
name: String,
},
AddColumn {
table: String,
column: Column,
},
DropColumn {
table: String,
column: String,
},
AlterColumnType {
table: String,
column: String,
from: String,
to: String,
},
AlterColumnNullable {
table: String,
column: String,
to: bool,
},
AlterColumnDefault {
table: String,
column: String,
to: Option<String>,
},
AddPrimaryKey {
table: String,
columns: Vec<String>,
},
DropPrimaryKey {
table: String,
},
AddUnique {
table: String,
columns: Vec<String>,
},
DropUnique {
table: String,
columns: Vec<String>,
},
}Expand description
All structural diffs between two schemas. Ordering is meaningful for emit: dependencies first (CREATE TABLE before its columns get touched).
Variants§
AddTable(Table)
DropTable
AddColumn
DropColumn
AlterColumnType
AlterColumnNullable
AlterColumnDefault
AddPrimaryKey
DropPrimaryKey
AddUnique
DropUnique
Trait Implementations§
impl Eq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.