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

Function create_customer_table

tests/common/bakery_chain/schema.rs:68–83  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

66}
67
68pub 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
85pub async fn create_order_table(db: &DbConn) -> Result<ExecResult, DbErr> {
86 let stmt = Table::create()

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