(
db: &DbConn,
create: &TableCreateStatement,
entity: E,
)
| 125 | } |
| 126 | |
| 127 | pub async fn create_table<E>( |
| 128 | db: &DbConn, |
| 129 | create: &TableCreateStatement, |
| 130 | entity: E, |
| 131 | ) -> Result<ExecResult, DbErr> |
| 132 | where |
| 133 | E: EntityTrait, |
| 134 | { |
| 135 | let builder = db.get_database_backend(); |
| 136 | let schema = Schema::new(builder); |
| 137 | assert_eq!( |
| 138 | builder.build(&schema.create_table_from_entity(entity)), |
| 139 | builder.build(create) |
| 140 | ); |
| 141 | |
| 142 | create_table_without_asserts(db, create).await |
| 143 | } |
| 144 | |
| 145 | pub async fn create_table_without_asserts( |
| 146 | db: &DbConn, |
no test coverage detected