pub enum MigrationOp {
Show 25 variants
CreateTable {
name: String,
},
DropTable {
name: String,
},
AddColumn {
table: String,
column: String,
},
DropColumn {
table: String,
column: String,
},
AlterColumn {
table: String,
column: String,
},
AddIndex {
table: String,
index: String,
},
DropIndex {
table: String,
index: String,
},
AddUnique {
table: String,
constraint: String,
},
DropUnique {
table: String,
constraint: String,
},
AddForeignKey {
table: String,
constraint: String,
},
DropForeignKey {
table: String,
constraint: String,
},
AddCheck {
table: String,
constraint: String,
},
DropCheck {
table: String,
constraint: String,
},
CreateProcedure {
name: String,
procedure: ProcedureSpec,
},
ReplaceProcedure {
name: String,
procedure: ProcedureSpec,
},
DropProcedure {
name: String,
},
CreateTrigger {
name: String,
trigger: TriggerSpec,
},
ReplaceTrigger {
name: String,
trigger: TriggerSpec,
},
DropTrigger {
name: String,
},
CreateVirtualTable {
table: VirtualTableSpec,
},
DropVirtualTable {
name: String,
},
CreateView {
name: String,
view: ViewSpec,
},
ReplaceView {
name: String,
view: ViewSpec,
},
DropView {
name: String,
},
RawSql(String),
}Expand description
A single schema-migration operation.
Variants§
CreateTable
DropTable
AddColumn
DropColumn
AlterColumn
AddIndex
DropIndex
AddUnique
DropUnique
AddForeignKey
DropForeignKey
AddCheck
DropCheck
CreateProcedure
ReplaceProcedure
DropProcedure
CreateTrigger
ReplaceTrigger
DropTrigger
CreateVirtualTable
Fields
§
table: VirtualTableSpecDropVirtualTable
CreateView
ReplaceView
DropView
RawSql(String)
Trait Implementations§
Source§impl Clone for MigrationOp
impl Clone for MigrationOp
Source§fn clone(&self) -> MigrationOp
fn clone(&self) -> MigrationOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MigrationOp
impl Debug for MigrationOp
Source§impl<'de> Deserialize<'de> for MigrationOp
impl<'de> Deserialize<'de> for MigrationOp
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MigrationOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MigrationOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MigrationOp
Source§impl PartialEq for MigrationOp
impl PartialEq for MigrationOp
Source§fn eq(&self, other: &MigrationOp) -> bool
fn eq(&self, other: &MigrationOp) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MigrationOp
impl Serialize for MigrationOp
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for MigrationOp
Auto Trait Implementations§
impl Freeze for MigrationOp
impl RefUnwindSafe for MigrationOp
impl Send for MigrationOp
impl Sync for MigrationOp
impl Unpin for MigrationOp
impl UnsafeUnpin for MigrationOp
impl UnwindSafe for MigrationOp
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more