fixup! [IMP] use sqlparse also to determine which ddl to update

This commit is contained in:
Holger Brunn
2022-07-12 20:20:54 +02:00
parent 38ae4a696c
commit b99468dec9
2 changed files with 12 additions and 9 deletions

View File

@@ -114,7 +114,7 @@ class TestPglogical(TransactionCase):
'alter table testtable',
'''create table
testtable
(col1 int, col2 int); select * from test''',
(col1 int, col2 int); select * from testtable''',
'alter table testschema.test drop column somecol',
' DROP view if exists testtable',
'truncate table testtable',
@@ -128,6 +128,8 @@ class TestPglogical(TransactionCase):
'ALTER TABLE "testtable" ADD COLUMN "test_field" double precision',
'CREATE TEMP TABLE "temptable" (col1 char) INHERITS (ir_translation)',
'DROP TABLE "temptable"',
'create view testtable as select col1, col2 from testtable join '
'testtable test1 on col3=test1.col4)',
):
qualified_query = ''.join(
''.join(str(token) for token in schema_qualify(parsed_query, temp_tables))