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

Function create_worker_table

tests/partial_model_nested/local/model/schema.rs:55–69  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

53}
54
55pub 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}

Callers 1

create_tablesFunction · 0.85

Calls 4

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

Tested by

no test coverage detected