liquibase.exception.DatabaseException: ERROR: relation "appointment" already exists [Failed SQL: CREATE TABLE public.appointment (id BIGSERIAL NOT NULL, version BIGINT, customer_id BIGINT, duration BYTEA, note TEXT, personal_available BOOLEAN DEFAULT 0, personal_booked BOOLEAN DEFAULT 0, provider_id BIGINT, start_time BYTEA, url VARCHAR(255), CONSTRAINT "appointmentPK" PRIMARY KEY (id))]

Stack Overflow | Michael.D | 3 months ago
  1. 0

    grails 3 database migrations

    Stack Overflow | 3 months ago | Michael.D
    liquibase.exception.DatabaseException: ERROR: relation "appointment" already exists [Failed SQL: CREATE TABLE public.appointment (id BIGSERIAL NOT NULL, version BIGINT, customer_id BIGINT, duration BYTEA, note TEXT, personal_available BOOLEAN DEFAULT 0, personal_booked BOOLEAN DEFAULT 0, provider_id BIGINT, start_time BYTEA, url VARCHAR(255), CONSTRAINT "appointmentPK" PRIMARY KEY (id))]
  2. 0

    addForeignKeyConstraint + liquibase using in maven pom

    Stack Overflow | 10 months ago | Mohan
    liquibase.exception.DatabaseException: ORA-02270: no matching unique or primary key for this column-list [Failed SQL: ALTER TABLE USERS ADD CONSTRAINT FK_USERS FOREIGN KEY (ID) REFERENCES USER_ROLES (USER_ID)]
  3. 0

    Error in addForeignKeyConstraint when using overridden table names

    GitHub | 6 months ago | HemanthD
    liquibase.exception.DatabaseException: Cannot add foreign key constraint [Failed SQL: ALTER TABLE atlas.pa_option ADD CONSTRAINT fk_option_criteria_id FOREIGN KEY (criteria_id) REFERENCES atlas.criteria (id)]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Grails run-app: Execution failed for task ':bootRun'. Error: failed to start server

    Stack Overflow | 7 months ago | marcco_m
    liquibase.exception.DatabaseException: Table "QUOTE" already exists; SQL statement: CREATE TABLE PUBLIC.quote (id BIGINT AUTO_INCREMENT NOT NULL, version BIGINT NOT NULL, text VARCHAR(255) NOT NULL, CONSTRAINT quotePK PRIMARY KEY (id)) [42101-191] [Failed SQL: CREATE TABLE PUBLIC.quote (id BIGINT AUTO_INCREMENT NOT NULL, version BIGINT NOT NULL, text VARCHAR(255) NOT NULL, CONSTRAINT quotePK PRIMARY KEY (id))]
  6. 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))]

    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: relation "appointment" already exists [Failed SQL: CREATE TABLE public.appointment (id BIGSERIAL NOT NULL, version BIGINT, customer_id BIGINT, duration BYTEA, note TEXT, personal_available BOOLEAN DEFAULT 0, personal_booked BOOLEAN DEFAULT 0, provider_id BIGINT, start_time BYTEA, url VARCHAR(255), CONSTRAINT "appointmentPK" PRIMARY KEY (id))]

      at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement()
    2. Liquibase Core
      JdbcExecutor$ExecuteStatementCallback.doInStatement
      1. liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
      1 frame