pub enum PlanStep {
CreateTable {
columns: Vec<ColumnSpec>,
comment: Option<String>,
properties: Vec<(String, String)>,
},
AddColumn {
column: ColumnSpec,
},
WidenColumn {
name: String,
from: ProtoFieldType,
to: ProtoFieldType,
},
SetComment {
target: CommentTarget,
text: String,
hash: String,
},
SetProperty {
key: String,
value: String,
},
}Expand description
A single action a backend must take to reconcile the target.
Variants§
CreateTable
The table does not exist; create it with these columns, comment, and properties. Column and table comments are carried inline (a fresh table is stamped in one shot), each with its precomputed managed hash.
Fields
§
columns: Vec<ColumnSpec>Columns to create, in order.
AddColumn
Add a new column to an existing table.
Fields
§
column: ColumnSpecThe column to add.
WidenColumn
Widen an existing column’s type in place (lossless).
SetComment
Set or update a managed comment. hash is the content hash to persist as
twg:comment_hash so a later no-op deploy does not re-stamp it.
Fields
§
target: CommentTargetColumn or table the comment applies to.
SetProperty
Set or update a table property/tag.
Trait Implementations§
impl Eq for PlanStep
impl StructuralPartialEq for PlanStep
Auto Trait Implementations§
impl Freeze for PlanStep
impl RefUnwindSafe for PlanStep
impl Send for PlanStep
impl Sync for PlanStep
impl Unpin for PlanStep
impl UnwindSafe for PlanStep
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