(db: &DbConn)
| 251 | } |
| 252 | |
| 253 | pub async fn create_satellites_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 254 | let stmt = sea_query::Table::create() |
| 255 | .table(satellite::Entity) |
| 256 | .col( |
| 257 | ColumnDef::new(satellite::Column::Id) |
| 258 | .integer() |
| 259 | .not_null() |
| 260 | .auto_increment() |
| 261 | .primary_key(), |
| 262 | ) |
| 263 | .col( |
| 264 | ColumnDef::new(satellite::Column::SatelliteName) |
| 265 | .string() |
| 266 | .not_null(), |
| 267 | ) |
| 268 | .col( |
| 269 | ColumnDef::new(satellite::Column::LaunchDate) |
| 270 | .timestamp_with_time_zone() |
| 271 | .not_null() |
| 272 | .default("2022-01-26 16:24:00"), |
| 273 | ) |
| 274 | .col( |
| 275 | ColumnDef::new(satellite::Column::DeploymentDate) |
| 276 | .timestamp_with_time_zone() |
| 277 | .not_null() |
| 278 | .default("2022-01-26 16:24:00"), |
| 279 | ) |
| 280 | .to_owned(); |
| 281 | |
| 282 | create_table(db, &stmt, Satellite).await |
| 283 | } |
| 284 | |
| 285 | pub async fn create_transaction_log_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 286 | let stmt = sea_query::Table::create() |
no test coverage detected