all tests are passing
This commit is contained in:
@@ -37,13 +37,19 @@ async fn setup_test_environment(pool: &PgPool) -> (String, String, i64) {
|
|||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Create table definition
|
// Create table definition with proper columns
|
||||||
|
let columns_json = serde_json::json!([
|
||||||
|
r#""id" BIGSERIAL PRIMARY KEY"#,
|
||||||
|
r#""deleted" BOOLEAN NOT NULL DEFAULT FALSE"#,
|
||||||
|
r#""firma" TEXT NOT NULL"#
|
||||||
|
]);
|
||||||
|
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
r#"INSERT INTO table_definitions (profile_id, table_name, columns, indexes)
|
r#"INSERT INTO table_definitions (profile_id, table_name, columns, indexes)
|
||||||
VALUES ($1, $2, $3, $4)"#,
|
VALUES ($1, $2, $3, $4)"#,
|
||||||
profile_id,
|
profile_id,
|
||||||
table_name,
|
table_name,
|
||||||
json!({}),
|
columns_json, // Use proper columns array
|
||||||
json!([])
|
json!([])
|
||||||
)
|
)
|
||||||
.execute(&mut *tx)
|
.execute(&mut *tx)
|
||||||
|
|||||||
Reference in New Issue
Block a user