apgdiff icon indicating copy to clipboard operation
apgdiff copied to clipboard

Cannot parse string: CREATE TABLE

Open ianthrive opened this issue 6 years ago • 3 comments

apgdiff 2.4 jdk 10.0.2

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: CREATE TABLE public.timeclock_punches (
    id integer NOT NULL,
    user_id integer NOT NULL,
    type_id text NOT NULL,
    class_id text DEFAULT 'worked'::text NOT NULL,
    startend tstzrange DEFAULT tstzrange(now(), NULL::timestamp with time zone, '[)'::text) NOT NULL,
    created_date timestamp with time zone DEFAULT now() NOT NULL,
    updated_date timestamp with time zone DEFAULT now() NOT NULL,
    created_id integer,
    updated_id integer,
    error boolean DEFAULT false NOT NULL,
    location_start text,
    location_end text,
    department_id integer,
    CONSTRAINT timeclock_punches_location_end_check CHECK ((location_end <> ''::text)),
    CONSTRAINT timeclock_punches_location_start_check CHECK ((location_start <> ''::text)),
    CONSTRAINT timeclock_punches_startend_check CHECK (((lower_inc(startend) IS TRUE) AND (upper_inc(startend) IS FALSE) AND (upper(startend) >= lower(startend)) AND ((lower(startend) - upper(startend)) < '24:00:00'::interval)))
);
Unsupported command at position 266 'NOT NULL,
    create'
	at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parser.java:390)
	at cz.startnet.utils.pgdiff.parsers.CreateTableParser.parse(CreateTableParser.java:84)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:178)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:236)
	at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:29)
	at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

ianthrive avatar Sep 24 '18 00:09 ianthrive

Test with this jar https://github.com/fordfrog/apgdiff/issues/239#issuecomment-414983656

jalissonmello avatar Nov 13 '18 00:11 jalissonmello

Now in release the folder its the jar version 2.6.0

jalissonmello avatar Feb 21 '19 23:02 jalissonmello

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

jalissonmello avatar Apr 17 '19 23:04 jalissonmello