(db: &DbConn)
| 196 | } |
| 197 | |
| 198 | pub async fn create_active_enum_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 199 | let create_table_stmt = sea_query::Table::create() |
| 200 | .table(active_enum::Entity.table_ref()) |
| 201 | .col( |
| 202 | ColumnDef::new(active_enum::Column::Id) |
| 203 | .integer() |
| 204 | .not_null() |
| 205 | .auto_increment() |
| 206 | .primary_key(), |
| 207 | ) |
| 208 | .col(ColumnDef::new(active_enum::Column::Category).string_len(1)) |
| 209 | .col(ColumnDef::new(active_enum::Column::Color).integer()) |
| 210 | .col( |
| 211 | ColumnDef::new(active_enum::Column::Tea) |
| 212 | .enumeration(TeaEnum, [TeaVariant::EverydayTea, TeaVariant::BreakfastTea]), |
| 213 | ) |
| 214 | .to_owned(); |
| 215 | |
| 216 | create_table(db, &create_table_stmt, ActiveEnum).await |
| 217 | } |
| 218 | |
| 219 | pub async fn create_active_enum_child_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 220 | let create_table_stmt = sea_query::Table::create() |
no test coverage detected