pub enum AutoMigrateStep<'def> {
Show 19 variants
RemoveIndex(<IndexDef as ModuleDefLookup>::Key<'def>),
RemoveConstraint(<ConstraintDef as ModuleDefLookup>::Key<'def>),
RemoveSequence(<SequenceDef as ModuleDefLookup>::Key<'def>),
RemoveSchedule(<ScheduleDef as ModuleDefLookup>::Key<'def>),
RemoveView(<ViewDef as ModuleDefLookup>::Key<'def>),
RemoveRowLevelSecurity(<RawRowLevelSecurityDefV9 as ModuleDefLookup>::Key<'def>),
RemoveTable(<TableDef as ModuleDefLookup>::Key<'def>),
ChangeColumns(<TableDef as ModuleDefLookup>::Key<'def>),
AddColumns(<TableDef as ModuleDefLookup>::Key<'def>),
AddTable(<TableDef as ModuleDefLookup>::Key<'def>),
AddIndex(<IndexDef as ModuleDefLookup>::Key<'def>),
AddSequence(<SequenceDef as ModuleDefLookup>::Key<'def>),
AddSchedule(<ScheduleDef as ModuleDefLookup>::Key<'def>),
AddView(<ViewDef as ModuleDefLookup>::Key<'def>),
AddRowLevelSecurity(<RawRowLevelSecurityDefV9 as ModuleDefLookup>::Key<'def>),
ChangeAccess(<TableDef as ModuleDefLookup>::Key<'def>),
ChangePrimaryKey(<TableDef as ModuleDefLookup>::Key<'def>),
UpdateView(<ViewDef as ModuleDefLookup>::Key<'def>),
DisconnectAllUsers,
}Expand description
A step in an automatic migration.
Variants§
RemoveIndex(<IndexDef as ModuleDefLookup>::Key<'def>)
Remove an index.
RemoveConstraint(<ConstraintDef as ModuleDefLookup>::Key<'def>)
Remove a constraint.
RemoveSequence(<SequenceDef as ModuleDefLookup>::Key<'def>)
Remove a sequence.
RemoveSchedule(<ScheduleDef as ModuleDefLookup>::Key<'def>)
Remove a schedule annotation from a table.
RemoveView(<ViewDef as ModuleDefLookup>::Key<'def>)
Remove a view and corresponding view table
RemoveRowLevelSecurity(<RawRowLevelSecurityDefV9 as ModuleDefLookup>::Key<'def>)
Remove a row-level security query.
RemoveTable(<TableDef as ModuleDefLookup>::Key<'def>)
Remove an empty table and all its sub-objects (indexes, constraints, sequences). Validated at execution time: fails if the table contains data.
ChangeColumns(<TableDef as ModuleDefLookup>::Key<'def>)
Change the column types of a table, in a layout compatible way.
This should be done before any new indices are added.
AddColumns(<TableDef as ModuleDefLookup>::Key<'def>)
Add columns to a table, in a layout-INCOMPATIBLE way.
This is a destructive operation that requires first running a DisconnectAllUsers.
The added columns are guaranteed to be contiguous and at the end of the table. They are also guaranteed to have default values set.
When this step is present,
no ChangeColumns steps will be, for the same table.
AddTable(<TableDef as ModuleDefLookup>::Key<'def>)
Add a table, including all indexes, constraints, and sequences. There will NOT be separate steps in the plan for adding indexes, constraints, and sequences.
AddIndex(<IndexDef as ModuleDefLookup>::Key<'def>)
Add an index.
AddSequence(<SequenceDef as ModuleDefLookup>::Key<'def>)
Add a sequence.
AddSchedule(<ScheduleDef as ModuleDefLookup>::Key<'def>)
Add a schedule annotation to a table.
AddView(<ViewDef as ModuleDefLookup>::Key<'def>)
Add a view and corresponding view table
AddRowLevelSecurity(<RawRowLevelSecurityDefV9 as ModuleDefLookup>::Key<'def>)
Add a row-level security query.
ChangeAccess(<TableDef as ModuleDefLookup>::Key<'def>)
Change the access of a table.
ChangePrimaryKey(<TableDef as ModuleDefLookup>::Key<'def>)
Change the primary key of a table.
This updates the table_primary_key field in st_table
to match the new module definition.
Without this step, a stale primary key in the stored schema
causes check_compatible to fail on the next publish.
See: https://github.com/clockworklabs/SpacetimeDB/issues/3934
UpdateView(<ViewDef as ModuleDefLookup>::Key<'def>)
Recompute a view, update its backing table, and push updates to clients
DisconnectAllUsers
Disconnect all users connected to the module.
Trait Implementations§
Source§impl<'def> Debug for AutoMigrateStep<'def>
impl<'def> Debug for AutoMigrateStep<'def>
Source§impl<'def> Ord for AutoMigrateStep<'def>
impl<'def> Ord for AutoMigrateStep<'def>
Source§fn cmp(&self, other: &AutoMigrateStep<'def>) -> Ordering
fn cmp(&self, other: &AutoMigrateStep<'def>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'def> PartialEq for AutoMigrateStep<'def>
impl<'def> PartialEq for AutoMigrateStep<'def>
Source§impl<'def> PartialOrd for AutoMigrateStep<'def>
impl<'def> PartialOrd for AutoMigrateStep<'def>
impl<'def> Eq for AutoMigrateStep<'def>
impl<'def> StructuralPartialEq for AutoMigrateStep<'def>
Auto Trait Implementations§
impl<'def> Freeze for AutoMigrateStep<'def>
impl<'def> RefUnwindSafe for AutoMigrateStep<'def>
impl<'def> Send for AutoMigrateStep<'def>
impl<'def> Sync for AutoMigrateStep<'def>
impl<'def> Unpin for AutoMigrateStep<'def>
impl<'def> UnsafeUnpin for AutoMigrateStep<'def>
impl<'def> UnwindSafe for AutoMigrateStep<'def>
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
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<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>
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>
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