(db: &DbConn)
| 131 | } |
| 132 | |
| 133 | pub 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 | |
| 154 | pub async fn create_self_join_table(db: &DbConn) -> Result<ExecResult, DbErr> { |
| 155 | let stmt = sea_query::Table::create() |
no test coverage detected