liquibase.exception.DatabaseException: Cannot add foreign key constraint [Failed SQL: ALTER TABLE mlacak_dbtrackPool32.user_group ADD CONSTRAINT fk_user_group_userid FOREIGN KEY (userid) REFERENCES mlacak_dbtrackPool32.users (id) ON DELETE CASCADE]

GitHub | bowo199 | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 2342#248218162

    GitHub | 6 months ago | bowo199
    liquibase.exception.DatabaseException: Cannot add foreign key constraint [Failed SQL: ALTER TABLE mlacak_dbtrackPool32.user_group ADD CONSTRAINT fk_user_group_userid FOREIGN KEY (userid) REFERENCES mlacak_dbtrackPool32.users (id) ON DELETE CASCADE]
  2. 0

    Unable to update 1.0.3 db?

    GitHub | 3 years ago | ojhunt
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE commafeed.FEEDENTRYTAGS ADD CONSTRAINT fk_entry_id FOREIGN KEY (entry_id) REFERENCES commafeed.FEEDENTRIES (id): Can't create table 'commafeed.#sql-3e1_87a6' (errno: 150)
  3. 0

    Can liquibase handle a partially updated schema?

    Stack Overflow | 4 years ago | Kramer
    liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE limit ADD id serial: ERROR: column "id" of relation "limit" already exists
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    PL/SQL and SQL script in one sqlFile with liquibase?

    Stack Overflow | 2 years ago | Gabor
    liquibase.exception.DatabaseException: ORA-06550: 4 line, 1 col: PLS-00103: Encountered the symbol: "/" [Failed SQL: BEGIN aud.someProcedure('parameter'); END; // insert into test_table(_id, value) VALUES(1, 'test') ]
  6. 0

    org.postgresql.util.PSQLException: ERROR: relation "messages" already exists

    GitHub | 2 years ago | AnwarMohamed
    liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE public.messages (id BIGSERIAL NOT NULL, account_id BIGINT NOT NULL, device_id BIGINT NOT NULL, encrypted_message TEXT NOT NULL, CONSTRAINT PK_MESSAGES PRIMARY KEY (id)): ERROR: relation "messages" already exists
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

    Cannot add foreign key constraint [Failed SQL: ALTER TABLE mlacak_dbtrackPool32.user_group ADD CONSTRAINT fk_user_group_userid FOREIGN KEY (userid) REFERENCES mlacak_dbtrackPool32.users (id) ON DELETE CASCADE]

    at liquibase.changelog.ChangeSet.execute()
  2. Liquibase Core
    Liquibase.update
    1. liquibase.changelog.ChangeSet.execute(ChangeSet.java:605)
    2. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
    3. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
    4. liquibase.Liquibase.update(Liquibase.java:214)
    5. liquibase.Liquibase.update(Liquibase.java:192)
    6. liquibase.Liquibase.update(Liquibase.java:188)
    6 frames
  3. org.traccar.database
    DataManager.<init>
    1. org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:141)
    2. org.traccar.database.DataManager.<init>(DataManager.java:67)
    2 frames
  4. org.traccar
    Main.main
    1. org.traccar.Context.init(Context.java:150)
    2. org.traccar.Main.main(Main.java:35)
    2 frames
  5. Java RT
    NativeMethodAccessorImpl.invoke0
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    1 frame