Error in databasechangelog table After Changeset Applied

Description

Running update w/o specifying an author/id in a changeset successfully executes the changeset, but fails to update the databasechangelog table. The current state is then untracked and inconsistent in the databasechangelog table.

$ liquibase --changeLogFile ./changelog.json --password PROMPT update

Starting Liquibase at Wed, 19 Sep 2018 12:49:09 EDT (version 3.6.2 built at 2018-07-03 11:28:09)
Unexpected error running Liquibase: ERROR: null value in column "id" violates not-null constraint
Detail: Failing row contains (null, null, changelog.json, 2018-09-19 12:49:13.031175, 1, EXECUTED, 8:546ea944fb438f131d0a1cbcd16e8da8, createTable tableName=products, , null, 3.6.2, null, null, 7375753010).
liquibase.exception.DatabaseException: ERROR: null value in column "id" violates not-null constraint
Detail: Failing row contains (null, null, changelog.json, 2018-09-19 12:49:13.031175, 1, EXECUTED, 8:546ea944fb438f131d0a1cbcd16e8da8, createTable tableName=products, , null, 3.6.2, null, null, 7375753010). [Failed SQL: INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES (NULL, NULL, 'changelog.json', NOW(), 1, '8:546ea944fb438f131d0a1cbcd16e8da8', 'createTable tableName=products', '', 'EXECUTED', NULL, NULL, '3.6.2', '7375753010')]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:109)
at liquibase.changelog.StandardChangeLogHistoryService.setExecType(StandardChangeLogHistoryService.java:384)
at liquibase.database.AbstractJdbcDatabase.markChangeSetExecStatus(AbstractJdbcDatabase.java:1086)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:64)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.commandline.Main.doMigration(Main.java:1205)
at liquibase.integration.commandline.Main.run(Main.java:191)
at liquibase.integration.commandline.Main.main(Main.java:129)
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "id" violates not-null constraint
Detail: Failing row contains (null, null, changelog.json, 2018-09-19 12:49:13.031175, 1, EXECUTED, 8:546ea944fb438f131d0a1cbcd16e8da8, createTable tableName=products, , null, 3.6.2, null, null, 7375753010).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
... 12 common frames omitted

Environment

Mac OS X

Activity

Show:

Details

Reporter

Components

Affects versions

Priority

Created September 19, 2018 at 6:16 PM
Updated September 19, 2018 at 6:16 PM