(db: &DbConn)
| 66 | } |
| 67 | |
| 68 | pub async fn create_customer_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 69 | let stmt = Table::create() |
| 70 | .table(customer::Entity) |
| 71 | .col( |
| 72 | ColumnDef::new(customer::Column::Id) |
| 73 | .integer() |
| 74 | .not_null() |
| 75 | .auto_increment() |
| 76 | .primary_key(), |
| 77 | ) |
| 78 | .col(ColumnDef::new(customer::Column::Name).string().not_null()) |
| 79 | .col(ColumnDef::new(customer::Column::Notes).text()) |
| 80 | .to_owned(); |
| 81 | |
| 82 | create_table(db, &stmt, Customer).await |
| 83 | } |
| 84 | |
| 85 | pub async fn create_order_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 86 | let stmt = Table::create() |
no test coverage detected