Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error on migrate #16

Closed
ghost opened this issue Dec 14, 2014 · 2 comments
Closed

Getting error on migrate #16

ghost opened this issue Dec 14, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 14, 2014

Getting this error when I try artisan migrate

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL
: alter table `assigned_roles` add constraint assigned_roles_user_id_foreig
n foreign key (`user_id`) references `users` (`id`) on delete cascade)

[PDOException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
@ghost
Copy link
Author

ghost commented Dec 14, 2014

Solved the problem by adding

$table->engine = 'InnoDB';

to user and language migrations

@ghost ghost closed this as completed Dec 14, 2014
@mrakodol
Copy link
Owner

TNX, I change that files and commit for other users.

@zcosmin20 zcosmin20 mentioned this issue Dec 1, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant