compiled without any problems

This commit is contained in:
filipriec
2025-03-15 21:16:14 +01:00
parent d0bc41978d
commit ff185549b4
2 changed files with 5 additions and 4 deletions

View File

@@ -62,7 +62,8 @@ pub async fn post_table_script(
// Parse and transform the script
let parser = SyntaxParser::new();
let parsed_script = parser.parse(&request.script);
let parsed_script = parser.parse(&request.script, &table_def.table_name);
let (tables, columns) = parser.extract_dependencies(&request.script, &table_def.table_name);
// Store script in database with automatic target_table
let script_record = sqlx::query!(
@@ -72,7 +73,7 @@ pub async fn post_table_script(
VALUES ($1, $2, $3, $4, $5, $6, $7)
RETURNING id"#,
request.table_definition_id,
table_def.table_name, // Auto-populate target_table from table_def
table_def.table_name,
request.target_column,
column_type,
parsed_script,