fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
353 stars 138 forks source link

Cannot find object 'if' for statement 'ALTER TABLE IF EXISTS ONLY #252

Open wikkid opened 5 years ago

wikkid commented 5 years ago

Would be great if you will look at this (v.2.6):

Exception in thread "main" java.lang.RuntimeException: Cannot find object 'if' for statement 'ALTER TABLE IF EXISTS ONLY public.xxxxx_xxxxx DROP CONSTRAINT IF EXISTS xxxxx_xxxxx_uip_id_d3dcc455_fk_xxxxx_app;'.
    at cz.startnet.utils.pgdiff.parsers.AlterRelationParser.parse(AlterRelationParser.java:74)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:239)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:311)
    at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:35)
    at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

Thank you!

jalissonmello commented 5 years ago

Can you provide the script or a example to help with the tests?