MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / create_satellites_table

Function create_satellites_table

tests/common/features/schema.rs:253–283  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

251}
252
253pub 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
285pub async fn create_transaction_log_table(db: &DbConn) -> Result<ExecResult, DbErr> {
286 let stmt = sea_query::Table::create()

Callers 1

create_tablesFunction · 0.85

Calls 5

createFunction · 0.50
newFunction · 0.50
create_tableFunction · 0.50
auto_incrementMethod · 0.45
defaultMethod · 0.45

Tested by

no test coverage detected