#[non_exhaustive]pub enum AlterTableSingle {
RenameTable {
new_table_name: &'static str,
},
AddColumn {
column: TableField,
},
RenameColumn {
old_column_name: &'static str,
new_column_name: &'static str,
},
}Expand description
Single alter-table operation used by the migration procedural macros.
This enum is not intended to be constructed manually in user code; the
Table macro generates these values when compiling migrations.
§⚠️ API instability
This type is marked as #[non_exhaustive] and will be changed in the
future. Prefer to rely on the macros instead of matching all variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RenameTable
Rename an existing table.
AddColumn
Add a new column definition to an existing table.
Fields
§
column: TableFieldRenameColumn
Rename an existing column.
Auto Trait Implementations§
impl Freeze for AlterTableSingle
impl RefUnwindSafe for AlterTableSingle
impl Send for AlterTableSingle
impl Sync for AlterTableSingle
impl Unpin for AlterTableSingle
impl UnwindSafe for AlterTableSingle
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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