working setup where steel script works, with example
This commit is contained in:
@@ -61,17 +61,19 @@ pub async fn post_table_script(
|
||||
)
|
||||
.map_err(|e| Status::invalid_argument(e))?;
|
||||
|
||||
// Store script in database with column type
|
||||
|
||||
// Store script in database with column type and profile_id
|
||||
let script_record = sqlx::query!(
|
||||
r#"INSERT INTO table_scripts
|
||||
(table_definitions_id, target_column, target_column_type, script, description)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
(table_definitions_id, target_column, target_column_type, script, description, profile_id)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)
|
||||
RETURNING id"#,
|
||||
request.table_definition_id,
|
||||
request.target_column,
|
||||
column_type,
|
||||
request.script,
|
||||
request.description
|
||||
request.description,
|
||||
table_def.profile_id // Use the profile_id from table_definitions
|
||||
)
|
||||
.fetch_one(db_pool)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user