Error: 150 Foreign key constraint is incorrectly formed
-
Hi we have having our logs filled with this error.
We got this from a brand new install so it does not look like a plugin conflict. We disabled all the other plugins and themes just in case this was the issue.
This however looks to me something to do with theutf8mb4_unicode_520_ci
and the referenced users table but any suggestions on actions we can do to resolve this. Many thanks.WordPress database error Can't create table .wp_tutor_notification_preferences (errno: 150 "Foreign key constraint is incorrectly formed") for query CREATE TABLE IF NOT EXISTS wp_tutor_notification_preferences (
id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
user_id BIGINT(20) UNSIGNED NOT NULL,
notification_type VARCHAR(50) NOT NULL, -- email, push, onsite, sms
group_name VARCHAR(50) NOT NULL, -- email_to_students, email_to_teachers, email_to_admin
trigger_name VARCHAR(255) NOT NULL,
opt_in TINYINT NOT NULL DEFAULT 1,
FOREIGN KEY (user_id) REFERENCES wp_users(id) ON DELETE CASCADE
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, TUTOR_PRO\NotificationPreference->create_table, dbDelta
- You must be logged in to reply to this topic.