pub enum SchemaChange {
Show 15 variants
AddTable {
table_name: String,
},
DropTable {
table_name: String,
},
RenameTable {
old_name: String,
new_name: String,
},
AddColumn {
table_name: String,
column: Column,
},
DropColumn {
table_name: String,
column_name: String,
rename_candidates: Vec<String>,
},
RenameColumn {
table_name: String,
old_name: String,
new_name: String,
},
ModifyColumn {
table_name: String,
old_column: Column,
new_column: Column,
},
AddKey {
table_name: String,
key: Key,
ordinal: usize,
},
DropKey {
table_name: String,
key: Key,
ordinal: usize,
},
AddConstraint {
table_name: String,
constraint: Constraint,
},
DropConstraint {
table_name: String,
constraint_name: String,
},
AddRelation {
relation: Relation,
ordinal: usize,
},
DropRelation {
relation: Relation,
ordinal: usize,
},
AddView {
view: View,
},
DropView {
view_name: String,
},
}Variants§
AddTable
DropTable
RenameTable
AddColumn
DropColumn
RenameColumn
ModifyColumn
AddKey
Fields
§
ordinal: usize1-based position of key among the sibling keys the create path numbers it
with - unique keys are numbered among the table’s other unique keys, indexes
among the table’s other indexes - so a migration can reproduce the exact
ak_<table><n> / ix_<table><n> name the create path would use.
DropKey
AddConstraint
DropConstraint
AddRelation
Fields
DropRelation
AddView
DropView
Trait Implementations§
Source§impl Clone for SchemaChange
impl Clone for SchemaChange
Auto Trait Implementations§
impl Freeze for SchemaChange
impl RefUnwindSafe for SchemaChange
impl Send for SchemaChange
impl Sync for SchemaChange
impl Unpin for SchemaChange
impl UnsafeUnpin for SchemaChange
impl UnwindSafe for SchemaChange
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