-
Notifications
You must be signed in to change notification settings - Fork 294
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
Problem with migrating this "2016_07_29_171128_create_foreign_keys" #283
Comments
same here |
I have fixed this issue by using increment('id') instead of id() in 2014_10_12_000000_create_users_table.php file |
That did work however, now this error responds after changing the unsignedBigIntegers. General error: 1005 Can't create table |
first you need to fresh database next use migrate |
I did manage to get it working eveentually, apologies for not updating the issue. I've since created my own due to it being a university project and looks good having my own. |
Migrating: 2016_07_29_171118_create_chatter_post_table Illuminate\Database\QueryException SQLSTATE[HY000]: General error: 1005 Can't create table at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
13 database/migrations/2016_07_29_171128_create_foreign_keys.php:17
35 artisan:37 |
help please ;( |
Migrating: 2016_07_29_171128_create_foreign_keys
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table
chatter_discussion
add constraintchatter_discussion_user_id_foreign
foreign key (user_id
) referencesusers
(id
) on delete cascade on update cascade)at /Users/veikoteekel/PhpstormProjects/pillamail2/pillamail/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
Exception trace:
1 PDOException::("SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint")
/Users/veikoteekel/PhpstormProjects/pillamail2/pillamail/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
2 PDOStatement::execute()
/Users/veikoteekel/PhpstormProjects/pillamail2/pillamail/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
Please use the argument -v to see more details.
The text was updated successfully, but these errors were encountered: