Is there a way to create a postgresql composite type in Sea-orm?

95 views Asked by At

I am trying to replicate

CREATE TYPE name AS
    ( [ attribute_name data_type [ COLLATE collation ] [, ... ] ] )

in Sea-orm.

I am able to recreate an enum type CREATE TYPE name AS ENUM using

            DbBackend::Postgres => {
                manager
                    .create_type(
                        Type::create()
                            .as_enum(SomeTable::Table)
                            .values([SomeTable::Value, SomeTable::AnotherValue])
                            .to_owned(),
                    )
                    .await?;

but I have not been successful in replicating a composite type.

0

There are 0 answers