pub enum Phase {
PreDeploy,
PostDeploy,
}Expand description
Deployment phase for a migration.
Migrations are split into phases for safe red-green deployments:
-
PreDeploy: Runs BEFORE new code is deployed. Must be backward-compatible with the old code still running. Safe operations: add nullable columns, create new tables, add indexes.
-
PostDeploy: Runs AFTER old code is fully terminated. Can include breaking changes. Operations: drop columns, rename columns, add NOT NULL constraints, drop tables.
Variants§
PreDeploy
Runs before new code deployment (must be backward-compatible)
PostDeploy
Runs after old code is terminated (can be breaking)
Implementations§
Trait Implementations§
impl Copy for Phase
impl Eq for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnwindSafe for Phase
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