chatter icon indicating copy to clipboard operation
chatter copied to clipboard

Custom User table foreign Key chatter_discussion_user_id_foreign` foreign key (`user_id`) references `users` (`id`)

Open cjxonix opened this issue 7 years ago • 1 comments

Custom User table foreign Key Causes issue to happen while running a migration.

[Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1005 Can't create tablexi_vendor.#sql-26a_4f1(errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter tablechatt
er_discussionadd constraintchatter_discussion_user_id_foreign foreign key (user_id) references users (id) on delete cascade on update cascade)

`class User extends Authenticatable {

use Notifiable;

protected $primaryKey = 'userId';

}`

I appreciate the help

cjxonix avatar Oct 14 '17 14:10 cjxonix

I am having a similar issue with this, someone help

mkcircles avatar Oct 17 '17 16:10 mkcircles