Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Fix data type issue causing foreignkey constraint #208

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

justcharlz
Copy link

Laravel 5.7 create_users_table migration file comes with BigIncrement for the user ID while the grafite starter pack is just increment for Create_user_meta_table hence users encounter foreign key constraint error during migrate --seed.

Illuminate\Database\QueryException : SQLSTATE[HY000]: Ge
neral error: 1215 Cannot add foreign key constraint (SQL: alter table user_meta add constraint user_meta_user_id_foreign foreign key (user_id) references
users (id) on delete cascade)

The latest version of Laravel 5.8 is just increment but Grafite/Starter does not work properly with it.

Laravel 5.7 create_users_table migration file comes with BigIncrement for the user ID while the grafite starter pack is just increment for Create_user_meta_table hence users encounter foreign key constraint error during migrate --seed.

Illuminate\Database\QueryException  : SQLSTATE[HY000]: Ge
neral error: 1215 Cannot add foreign key constraint (SQL: alter table `user_meta
` add constraint `user_meta_user_id_foreign` foreign key (`user_id`) references
`users` (`id`) on delete cascade)

The latest version of Laravel 5.8 is just increment but Grafite/Starter does not work properly with it.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants