Skip to content
Discussion options

You must be logged in to vote
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?;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@opeolluwa
Comment options

Answer selected by opeolluwa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants