pub enum SchemaChange {
Show 15 variants
CreateEntity(Entity),
RetireFieldConstraint {
entity: String,
field: String,
constraint: FieldConstraint,
},
ConvertField {
entity: String,
previous: Field,
field: Field,
},
WidenIntegerToDecimal {
entity: String,
field: String,
},
CopyJsonRecords {
source_entity: String,
source_field: String,
source_filter: Predicate,
section: String,
target_entity: String,
fields: Vec<String>,
},
PromoteIdentity {
entity: String,
field: String,
},
AddField {
entity: String,
field: Field,
},
AddUnique {
entity: String,
fields: Vec<String>,
},
AddIndex {
entity: String,
fields: Vec<String>,
},
AddConditionalIndex {
entity: String,
index: Index,
},
Seed {
entity: String,
values: Map<String, Value>,
},
SeedFrom {
entity: String,
absent_filter: Predicate,
source_entity: String,
source_filter: Predicate,
fields: BTreeMap<String, String>,
values: Map<String, Value>,
},
Backfill {
entity: String,
filter: Predicate,
values: Map<String, Value>,
},
CopyField {
entity: String,
source: String,
target: String,
filter: Predicate,
},
DeleteWhere {
entity: String,
filter: Predicate,
},
}Expand description
Additive schema changes with a backend-independent migration identity.
Variants§
CreateEntity(Entity)
RetireFieldConstraint
Retires exactly one obsolete physical constraint absent from the logical field. Other historical constraints, records, identities and indexes remain intact.
ConvertField
Converts stored values and the physical field using one shared lossless preflight.
WidenIntegerToDecimal
Widens an existing integer value to an exact two-place decimal without changing its name, identity, or historical value.
CopyJsonRecords
Adopts declared records from a historical JSON array into typed storage. Source filtering and the explicit field list prevent importing unrelated app data or accepting unrecognized columns.
Fields
PromoteIdentity
Convert an existing single-column integer primary key into a generated key.
AddField
AddUnique
AddIndex
AddConditionalIndex
Seed
SeedFrom
Creates a missing logical record from exactly one qualifying source row. Existing target records are preserved; absent or ambiguous sources fail closed.
Fields
Backfill
CopyField
DeleteWhere
Trait Implementations§
Source§impl Clone for SchemaChange
impl Clone for SchemaChange
Source§fn clone(&self) -> SchemaChange
fn clone(&self) -> SchemaChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaChange
impl Debug for SchemaChange
Source§impl<'de> Deserialize<'de> for SchemaChange
impl<'de> Deserialize<'de> for SchemaChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SchemaChange
impl PartialEq for SchemaChange
Source§fn eq(&self, other: &SchemaChange) -> bool
fn eq(&self, other: &SchemaChange) -> bool
self and other values to be equal, and is used by ==.