pub enum SchemaDiff {
Show 23 variants
TableAdded(TableDef),
TableDropped(String),
ColumnAdded {
table: String,
column: ColumnDef,
},
ColumnDropped {
table: String,
column: String,
},
ColumnAltered {
table: String,
column: String,
from: ColumnDef,
to: ColumnDef,
},
IndexAdded(IndexDef),
IndexDropped {
name: String,
table_name: String,
},
ViewAdded(ViewDef),
ViewDropped(String),
ViewAltered {
name: String,
from: String,
to: String,
},
SequenceAdded(SequenceDef),
SequenceDropped(String),
FunctionAdded(FunctionDef),
FunctionDropped(String),
FunctionAltered {
name: String,
},
EnumAdded(EnumDef),
EnumDropped(String),
ConstraintAdded(ConstraintDef),
ConstraintDropped {
table: String,
name: String,
},
TriggerAdded(TriggerDef),
TriggerDropped {
table: String,
name: String,
},
ExtensionAdded(String),
ExtensionDropped(String),
}Expand description
Differences between two schema snapshots.
Variants§
TableAdded(TableDef)
A table was added in the target schema.
TableDropped(String)
A table was dropped from the target schema.
ColumnAdded
A column was added to an existing table.
ColumnDropped
A column was dropped from an existing table.
ColumnAltered
A column definition was altered in an existing table.
IndexAdded(IndexDef)
An index was added in the target schema.
IndexDropped
An index was dropped from the target schema.
Carries both the index name and the table it belongs to — MySQL’s
DROP INDEX syntax requires the table (unlike PostgreSQL where
indexes are schema-scoped).
ViewAdded(ViewDef)
A view was added in the target schema.
ViewDropped(String)
A view was dropped from the target schema.
ViewAltered
A view definition was altered.
SequenceAdded(SequenceDef)
A sequence was added in the target schema.
SequenceDropped(String)
A sequence was dropped from the target schema.
FunctionAdded(FunctionDef)
A function was added in the target schema.
FunctionDropped(String)
A function was dropped from the target schema.
FunctionAltered
A function definition was altered.
EnumAdded(EnumDef)
An enum type was added in the target schema.
EnumDropped(String)
An enum type was dropped from the target schema.
ConstraintAdded(ConstraintDef)
A constraint was added in the target schema.
ConstraintDropped
A constraint was dropped from the target schema.
TriggerAdded(TriggerDef)
A trigger was added in the target schema.
TriggerDropped
A trigger was dropped from the target schema.
ExtensionAdded(String)
A PostgreSQL extension was added.
ExtensionDropped(String)
A PostgreSQL extension was dropped.
Trait Implementations§
Source§impl Clone for SchemaDiff
impl Clone for SchemaDiff
Source§fn clone(&self) -> SchemaDiff
fn clone(&self) -> SchemaDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more