compiled with the profile to be schemas
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user