(db: &DbConn)
| 53 | } |
| 54 | |
| 55 | pub async fn create_worker_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 56 | let stmt = Table::create() |
| 57 | .table(worker::Entity) |
| 58 | .col( |
| 59 | ColumnDef::new(worker::Column::Id) |
| 60 | .integer() |
| 61 | .not_null() |
| 62 | .auto_increment() |
| 63 | .primary_key(), |
| 64 | ) |
| 65 | .col(ColumnDef::new(worker::Column::Name).string().not_null()) |
| 66 | .to_owned(); |
| 67 | |
| 68 | create_table(db, &stmt, worker::Entity).await |
| 69 | } |
no test coverage detected