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

Function create_repository_table

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

Source from the content-addressed store, hash-verified

131}
132
133pub async fn create_repository_table(db: &DbConn) -> Result<ExecResult, DbErr> {
134 let stmt = sea_query::Table::create()
135 .table(repository::Entity)
136 .col(
137 ColumnDef::new(repository::Column::Id)
138 .string()
139 .not_null()
140 .primary_key(),
141 )
142 .col(
143 ColumnDef::new(repository::Column::Owner)
144 .string()
145 .not_null(),
146 )
147 .col(ColumnDef::new(repository::Column::Name).string().not_null())
148 .col(ColumnDef::new(repository::Column::Description).string())
149 .to_owned();
150
151 create_table(db, &stmt, Repository).await
152}
153
154pub async fn create_self_join_table(db: &DbConn) -> Result<ExecResult, DbErr> {
155 let stmt = sea_query::Table::create()

Callers 1

create_tablesFunction · 0.85

Calls 3

createFunction · 0.50
newFunction · 0.50
create_tableFunction · 0.50

Tested by

no test coverage detected