pub enum SchemaChange {
CreateTable {
table: String,
columns: Vec<TableColumn>,
},
AddColumn {
table: String,
column: String,
column_type: String,
default: Option<String>,
foreign_key: Option<ForeignKey>,
},
AddIndex {
table: String,
index: String,
columns: Vec<String>,
},
AddForeignKey {
table: String,
column: String,
foreign_table: String,
foreign_column: String,
},
}Expand description
Schema change operations
Variants§
CreateTable
Create a new table
AddColumn
Add a column to an existing table
Fields
§
foreign_key: Option<ForeignKey>AddIndex
Add an index
AddForeignKey
Add a foreign key constraint
Trait Implementations§
Source§impl Clone for SchemaChange
impl Clone for SchemaChange
Source§fn clone(&self) -> SchemaChange
fn clone(&self) -> SchemaChange
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 moreAuto Trait Implementations§
impl Freeze for SchemaChange
impl RefUnwindSafe for SchemaChange
impl Send for SchemaChange
impl Sync for SchemaChange
impl Unpin 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