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

Function create_tables

tests/common/bakery_chain/schema.rs:6–15  ·  view source on GitHub ↗
(db: &DatabaseConnection)

Source from the content-addressed store, hash-verified

4use sea_query::{ColumnDef, ForeignKey, ForeignKeyAction, Index, Table};
5
6pub async fn create_tables(db: &DatabaseConnection) -> Result<(), DbErr> {
7 create_bakery_table(db).await?;
8 create_baker_table(db).await?;
9 create_customer_table(db).await?;
10 create_order_table(db).await?;
11 create_cake_table(db).await?;
12 create_cakes_bakers_table(db).await?;
13 create_lineitem_table(db).await?;
14 Ok(())
15}
16
17pub async fn create_bakery_table(db: &DbConn) -> Result<ExecResult, DbErr> {
18 let stmt = Table::create()

Callers

nothing calls this directly

Calls 7

create_baker_tableFunction · 0.85
create_customer_tableFunction · 0.85
create_order_tableFunction · 0.85
create_cake_tableFunction · 0.85
create_lineitem_tableFunction · 0.85
create_bakery_tableFunction · 0.70

Tested by

no test coverage detected