compiled with the profile to be schemas

This commit is contained in:
filipriec
2025-06-21 10:37:37 +02:00
parent 63f1b4da2e
commit 4e29d0084f
8 changed files with 42 additions and 40 deletions

View File

@@ -49,7 +49,7 @@ pub async fn post_table_script(
) -> Result<TableScriptResponse, Status> {
// Fetch the table definition
let table_def = sqlx::query!(
r#"SELECT id, table_name, columns, profile_id
r#"SELECT id, table_name, columns, schema_id
FROM table_definitions WHERE id = $1"#,
request.table_definition_id
)
@@ -76,7 +76,7 @@ pub async fn post_table_script(
let script_record = sqlx::query!(
r#"INSERT INTO table_scripts
(table_definitions_id, target_table, target_column,
target_column_type, script, description, profile_id)
target_column_type, script, description, schema_id)
VALUES ($1, $2, $3, $4, $5, $6, $7)
RETURNING id"#,
request.table_definition_id,
@@ -85,7 +85,7 @@ pub async fn post_table_script(
column_type,
parsed_script,
request.description,
table_def.profile_id
table_def.schema_id
)
.fetch_one(db_pool)
.await