liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]

JIRA | Georgi Georgiev | 1 year ago
  1. 0

    The stacktrace bellow shows that the generated changelog contains an extra single quote, in front of the default column value: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building liquibase 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ liquibase --- [INFO] Deleting C:\dev\UNIONVMS\branches\dev\Modules\Reporting\maven.1438864315428\DB\liquibase\target [INFO] [INFO] --- liquibase-maven-plugin:3.4.0:update (default-cli) @ liquibase --- [INFO] ------------------------------------------------------------------------ [INFO] Executing on Database: jdbc:postgresql://localhost:5432/uvms INFO 8/19/15 11:58 AM: liquibase: Successfully acquired change log lock INFO 8/19/15 11:58 AM: liquibase: Reading from reporting.databasechangelog SEVERE 8/19/15 11:58 AM: liquibase: changelog/db-changelog-master.xml: changelog/0.1/generatedChangelog.xml::1439888259729-7::georgige (generated): Change Set changelog/0.1/generatedChangelog.xml::14398882597 29-7::georgige (generated) failed. Error: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)

    JIRA | 1 year ago | Georgi Georgiev
    liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]
  2. 0

    The stacktrace bellow shows that the generated changelog contains an extra single quote, in front of the default column value: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building liquibase 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ liquibase --- [INFO] Deleting C:\dev\UNIONVMS\branches\dev\Modules\Reporting\maven.1438864315428\DB\liquibase\target [INFO] [INFO] --- liquibase-maven-plugin:3.4.0:update (default-cli) @ liquibase --- [INFO] ------------------------------------------------------------------------ [INFO] Executing on Database: jdbc:postgresql://localhost:5432/uvms INFO 8/19/15 11:58 AM: liquibase: Successfully acquired change log lock INFO 8/19/15 11:58 AM: liquibase: Reading from reporting.databasechangelog SEVERE 8/19/15 11:58 AM: liquibase: changelog/db-changelog-master.xml: changelog/0.1/generatedChangelog.xml::1439888259729-7::georgige (generated): Change Set changelog/0.1/generatedChangelog.xml::14398882597 29-7::georgige (generated) failed. Error: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)

    JIRA | 1 year ago | Georgi Georgiev
    liquibase.exception.DatabaseException: ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]
  3. 0

    GitHub comment 1098#242354857

    GitHub | 3 months ago | jethan
    liquibase.exception.DatabaseException: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause [Failed SQL: CREATE TABLE demo.jhi_user (id BIGINT AUTO_INCREMENT NOT NULL, login VARCHAR(50) NOT NULL, password_hash VARCHAR(60) NULL, first_name VARCHAR(50) NULL, last_name VARCHAR(50) NULL, email VARCHAR(100) NULL, activated BIT(1) NOT NULL, lang_key VARCHAR(5) NULL, activation_key VARCHAR(20) NULL, reset_key VARCHAR(20) NULL, created_by VARCHAR(50) NOT NULL, created_date timestamp DEFAULT NOW() NOT NULL, reset_date timestamp NULL, last_modified_by VARCHAR(50) NULL, last_modified_date timestamp DEFAULT NOW() NULL, CONSTRAINT PK_JHI_USER PRIMARY KEY (id), UNIQUE (email), UNIQUE (login))]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 1098#242354857

    GitHub | 3 months ago | jethan
    liquibase.exception.DatabaseException: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause [Failed SQL: CREATE TABLE demo.jhi_user (id BIGINT AUTO_INCREMENT NOT NULL, login VARCHAR(50) NOT NULL, password_hash VARCHAR(60) NULL, first_name VARCHAR(50) NULL, last_name VARCHAR(50) NULL, email VARCHAR(100) NULL, activated BIT(1) NOT NULL, lang_key VARCHAR(5) NULL, activation_key VARCHAR(20) NULL, reset_key VARCHAR(20) NULL, created_by VARCHAR(50) NOT NULL, created_date timestamp DEFAULT NOW() NOT NULL, reset_date timestamp NULL, last_modified_by VARCHAR(50) NULL, last_modified_date timestamp DEFAULT NOW() NULL, CONSTRAINT PK_JHI_USER PRIMARY KEY (id), UNIQUE (email), UNIQUE (login))]
  6. 0

    question

    GitHub | 3 months ago | jethan
    liquibase.exception.DatabaseException: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause [Failed SQL: CREATE TABLE demo.jhi_user (id BIGINT AUTO_INCREMENT NOT NULL, login VARCHAR(50) NOT NULL, password_hash VARCHAR(60) NULL, first_name VARCHAR(50) NULL, last_name VARCHAR(50) NULL, email VARCHAR(100) NULL, activated BIT(1) NOT NULL, lang_key VARCHAR(5) NULL, activation_key VARCHAR(20) NULL, reset_key VARCHAR(20) NULL, created_by VARCHAR(50) NOT NULL, created_date timestamp DEFAULT NOW() NOT NULL, reset_date timestamp NULL, last_modified_by VARCHAR(50) NULL, last_modified_date timestamp DEFAULT NOW() NULL, CONSTRAINT PK_JHI_USER PRIMARY KEY (id), UNIQUE (email), UNIQUE (login))]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. liquibase.exception.DatabaseException

      ERROR: syntax error at or near "0" Position: 385 [Failed SQL: CREATE TABLE reporting.report (id BIGSERIAL NOT NULL, name VARCHAR(255) NOT NULL, description TEXT, filter_expression TEXT NOT NULL, out_components VARCHAR(255) NOT NULL, scope_id BIGINT NOT NULL, created_by VARCHAR(255) NOT NULL, created_on TIMESTAMP(29) WITHOUT TIME ZONE NOT NULL, deleted_on TIMESTAMP(29) WITHOUT TIME ZONE, deleted_by VARCHAR(255), is_deleted BPCHAR(1) DEFAULT ''0': :bpchar', is_shared BPCHAR(1) DEFAULT ''0'::bpchar' NOT NULL, CONSTRAINT report_pkey PRIMARY KEY (id))]

      at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement()
    2. Liquibase Core
      UpdateVisitor.visit
      1. liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
      2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
      4. liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1243)
      5. liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1226)
      6. liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)
      7. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
      7 frames