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]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by bowo199
, 1 year ago
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]
via GitHub by mrameezraja
, 1 year ago
The object 'DF_users_language' is dependent on column 'language'. [Failed SQL: ALTER TABLE [dbo].[users] DROP COLUMN [language]]
via GitHub by Turbovix
, 1 year ago
Table 'users' already exists [Failed SQL: CREATE TABLE traccar.users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(128) NOT NULL, email VARCHAR(128) NOT NULL, hashedpassword VARCHAR(128) NOT NULL, salt VARCHAR(128) NOT NULL, readonly BIT(1) DEFAULT
via GitHub by ruan0011
, 1 year ago
The object 'UQ__user__AB6E6164EA813277' is dependent on column 'email'. [Failed SQL: ALTER TABLE [dbo].[user] ALTER COLUMN [email] [varchar](128)]
via GitHub by moroq
, 1 year ago
Specified key was too long; max key length is 767 bytes [Failed SQL: CREATE TABLE c0_skiltrade.user (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(1024) NOT NULL, email VARCHAR(256) NOT NULL, hashedPassword VARCHAR(1024) NOT NULL, salt VARCHAR(1024
via GitHub by gpproton
, 1 year ago
ORA-00910: specified length too long for its datatype INFO | jvm 1 | 2016/10/16 11:54:19 | WrapperSimpleApp Error: [Failed SQL: CREATE TABLE TRACCAR.positions (id INTEGER NOT NULL, protocol VARCHAR2(128), deviceid INTEGER NOT NULL, servertime
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(ChangeSet.java:605)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
at liquibase.Liquibase.update(Liquibase.java:214)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.Liquibase.update(Liquibase.java:188)
at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:141)
at org.traccar.database.DataManager.(DataManager.java:67)
at org.traccar.Context.init(Context.java:150)
at org.traccar.Main.main(Main.java:35)

Users with the same issue

Once, 1 year ago
Once, 1 year ago
26 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.