Replies: 1 comment 1 reply
-
if db.get_database_backend() == DbBackend::Postgres {
manager
.create_type(
Type::create()
.as_enum(Priority::Type)
.values([Priority::High, Priority::Medium, Priority::Low])
.to_owned(),
)
.await?;
}
if db.get_database_backend() == DbBackend::Postgres {
manager
.drop_type(Type::drop().name(Priority::Type).to_owned())
.await?;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
opeolluwa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have this migration that runs successfully against SQLite but fails with PostgreSQL
Error: KernelError(DbConnectError("Execution Error: error returned from database: type \"priority\" does not exist"))Do I need to manually create the type in another migration script and how
Beta Was this translation helpful? Give feedback.
All reactions