all tests are passing
This commit is contained in:
@@ -37,13 +37,19 @@ async fn setup_test_environment(pool: &PgPool) -> (String, String, i64) {
|
||||
.await
|
||||
.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!(
|
||||
r#"INSERT INTO table_definitions (profile_id, table_name, columns, indexes)
|
||||
VALUES ($1, $2, $3, $4)"#,
|
||||
profile_id,
|
||||
table_name,
|
||||
json!({}),
|
||||
columns_json, // Use proper columns array
|
||||
json!([])
|
||||
)
|
||||
.execute(&mut *tx)
|
||||
|
||||
Reference in New Issue
Block a user