So, I’ve been playing around with liquibase some more and if I define a column with type integer and primary key and set the autoincrement value to true, the generated sql is incorrect
CREATE TABLE log (logid INTEGER CONSTRAINT logid PRIMARY KEY AUTOINCREMENT AUTOINCREMENT NOT NULL, date INTEGER NOT NULL, serverid TEXT NOT NULL, auxid TEXT, severity TEXT NOT NULL, message TEXT NOT NULL);
notice AUTOINCREMENT is inserted twice.
I’m using Liquibase 2.0.1, not quite sure why this is happening but after a little bit of digging I realised that in sqlite3 if a column is described as integer and primary key, auto increment is implicit. If I remove the autoincrement attribute it would work on sqlite but not on postgresql.
Any suggestions on how to work around this?