feat(db): add field_definition tables
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,3 +53,21 @@ async fn migrate_creates_vocabulary_and_authority_tables(pool: PgPool) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[sqlx::test]
|
||||
async fn migrate_creates_field_definition_tables(pool: PgPool) {
|
||||
let db = Db::from_pool(pool);
|
||||
|
||||
for table in ["field_definition", "field_definition_label"] {
|
||||
let regclass: Option<String> =
|
||||
sqlx::query_scalar(&format!("SELECT to_regclass('public.{table}')::text"))
|
||||
.fetch_one(db.pool())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
regclass.as_deref(),
|
||||
Some(table),
|
||||
"table {table} should exist"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user