chatter
chatter copied to clipboard
Custom User table foreign Key chatter_discussion_user_id_foreign` foreign key (`user_id`) references `users` (`id`)
Custom User table foreign Key Causes issue to happen while running a migration.
[Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1005 Can't create table
xi_vendor.
#sql-26a_4f1(errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table
chatt
er_discussionadd constraint
chatter_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
I am having a similar issue with this, someone help