Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating tables on mysql 15.1 #58

Open
fluffy-critter opened this issue Sep 11, 2024 · 0 comments
Open

Error creating tables on mysql 15.1 #58

fluffy-critter opened this issue Sep 11, 2024 · 0 comments

Comments

@fluffy-critter
Copy link
Contributor

Attempting a new install on a server running PHP 8.3.6 and mysql 15.1 results in this error:

table fof_item_tag [CREATE TABLE IF NOT EXISTS fof_item_tag ( user_id INT(11) NOT NULL DEFAULT '0' REFERENCES fof_user ( user_id ) ON UPDATE CASCADE ON DELETE CASCADE, item_id INT(11) NOT NULL DEFAULT '0' REFERENCES fof_item ( item_id ) ON UPDATE CASCADE ON DELETE CASCADE, tag_id INT(11) NOT NULL DEFAULT '0' REFERENCES fof_tag ( tag_id ) ON UPDATE CASCADE ON DELETE CASCADE, PRIMARY KEY ( user_id, item_id, tag_id ), FOREIGN KEY (user_id) REFERENCES fof_user (user_id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (item_id) REFERENCES fof_item (item_id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (tag_id) REFERENCES fof_tag (tag_id) ON UPDATE CASCADE ON DELETE CASCADE, KEY tag_id ( tag_id ) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;]

SQLSTATE[HY000]: General error: 1005 Can't create table `fof`.`fof_item_tag` (errno: 150 "Foreign key constraint is incorrectly formed")

It looks like the table fof_user doesn't exist so I think the table creation order has gotten messed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant