Open chisumo2016 opened 5 years ago
Seeding: RolesTableSeeder Seeding: PermissionsTableSeeder Seeding: RoleUserTableSeeder
Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (laravel-project.role_user, CONSTRAINT role_user_user_id_for eign FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE) (SQL: insert into role_user (user_id, role_id) values (1, 1))
laravel-project
role_user
role_user_user_id_for eign
user_id
users
id
role_id
This is my full code
https://paste.laravel.io/1f3431cd-9b92-4a6c-ab2d-4809f07761bb#77
Seeding: RolesTableSeeder Seeding: PermissionsTableSeeder Seeding: RoleUserTableSeeder
Illuminate\Database\QueryException : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
laravel-project
.role_user
, CONSTRAINTrole_user_user_id_for eign
FOREIGN KEY (user_id
) REFERENCESusers
(id
) ON DELETE CASCADE ON UPDATE CASCADE) (SQL: insert intorole_user
(user_id
,role_id
) values (1, 1))