Edit #2083
This commit is contained in:
parent
387b07e1c5
commit
390ca0f0f6
@ -15,7 +15,7 @@ impl MigrationTrait for Migration {
|
||||
manager
|
||||
.create_type(
|
||||
Type::create()
|
||||
.as_enum(Tea::Table)
|
||||
.as_enum(Tea::Enum)
|
||||
.values([Tea::EverydayTea, Tea::BreakfastTea])
|
||||
.to_owned(),
|
||||
)
|
||||
@ -33,7 +33,7 @@ impl MigrationTrait for Migration {
|
||||
DbBackend::MySql | DbBackend::Sqlite => {}
|
||||
DbBackend::Postgres => {
|
||||
manager
|
||||
.drop_type(Type::drop().name(Tea::Table).to_owned())
|
||||
.drop_type(Type::drop().name(Tea::Enum).to_owned())
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
@ -44,7 +44,8 @@ impl MigrationTrait for Migration {
|
||||
|
||||
#[derive(DeriveIden)]
|
||||
pub enum Tea {
|
||||
Table,
|
||||
#[sea_orm(iden = "tea")]
|
||||
Enum,
|
||||
#[sea_orm(iden = "EverydayTea")]
|
||||
EverydayTea,
|
||||
#[sea_orm(iden = "BreakfastTea")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user