fordfrog / apgdiff

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

Error can't parse string "AS integer" #250

Open tilwinjoy opened 5 years ago

tilwinjoy commented 5 years ago

Thanks for the great tool!

I get a parse error with "AS integer", after removing all of it's occurrence, the tool worked fine. I tried both versions 2.3 and 2.4

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: CREATE SEQUENCE public."<table_name>" AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
Unsupported command at position 59 'AS integer START WIT'
    at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parser.java:382)
    at cz.startnet.utils.pgdiff.parsers.CreateSequenceParser.parse(CreateSequenceParser.java:86)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:183)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:239)
    at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:36)
    at cz.startnet.utils.pgdiff.Main.main(Main.java:45)
jalissonmello commented 5 years ago

I think that the version 2.6 can solve your problem.

2.6.0