pub enum MigrationOperation {
Show 13 variants
CreateSchema(CreateSchema),
DropSchema(DropSchema),
CreateTable(CreateTable),
DropTable(DropTable),
RenameTable(RenameTable),
RenameColumn(RenameColumn),
AddColumn(AddColumn),
DropColumn(DropColumn),
AlterColumn(AlterColumn),
CreateIndex(CreateIndex),
DropIndex(DropIndex),
AddForeignKey(AddForeignKey),
DropForeignKey(DropForeignKey),
}Expand description
Ordered migration operations emitted by the diff engine.
Variants§
CreateSchema(CreateSchema)
DropSchema(DropSchema)
CreateTable(CreateTable)
DropTable(DropTable)
RenameTable(RenameTable)
RenameColumn(RenameColumn)
AddColumn(AddColumn)
DropColumn(DropColumn)
AlterColumn(AlterColumn)
CreateIndex(CreateIndex)
DropIndex(DropIndex)
AddForeignKey(AddForeignKey)
DropForeignKey(DropForeignKey)
Implementations§
Source§impl MigrationOperation
impl MigrationOperation
pub fn schema_name(&self) -> &str
pub fn table_name(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for MigrationOperation
impl Clone for MigrationOperation
Source§fn clone(&self) -> MigrationOperation
fn clone(&self) -> MigrationOperation
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 MigrationOperation
impl Debug for MigrationOperation
Source§impl PartialEq for MigrationOperation
impl PartialEq for MigrationOperation
Source§fn eq(&self, other: &MigrationOperation) -> bool
fn eq(&self, other: &MigrationOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MigrationOperation
impl StructuralPartialEq for MigrationOperation
Auto Trait Implementations§
impl Freeze for MigrationOperation
impl RefUnwindSafe for MigrationOperation
impl Send for MigrationOperation
impl Sync for MigrationOperation
impl Unpin for MigrationOperation
impl UnsafeUnpin for MigrationOperation
impl UnwindSafe for MigrationOperation
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