toasty_sql/stmt/
alter_type.rs1use super::Statement;
2
3use toasty_core::schema::db::EnumVariant;
4
5#[derive(Debug, Clone)]
10pub struct AlterType {
11 pub type_name: String,
13 pub variant: EnumVariant,
15}
16
17impl Statement {
18 pub fn alter_type_add_value(type_name: &str, variant: &EnumVariant) -> Self {
20 AlterType {
21 type_name: type_name.to_string(),
22 variant: variant.clone(),
23 }
24 .into()
25 }
26}
27
28impl From<AlterType> for Statement {
29 fn from(value: AlterType) -> Self {
30 Self::AlterType(value)
31 }
32}