We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when laravel5 and laravel-generators ~3.0
$table->integer('role_id')->unsigned()->index(); $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
error occurred when execute php artisan migrate
[Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1005 Can't create table 'laravel.#sql-a93_6186' (errno: 150) (SQL: alter table `role_user` add constraint role_user_role_id_foreign foreign key (`role_id`) references `roles` (`id`) on delete cascad e) [PDOException] SQLSTATE[HY000]: General error: 1005 Can't create table 'laravel.#sql-a93_6186' (errno: 150)
but $table->integer('role_id')->unsigned()->index()->references('id')->on('roles')->onDelete('cascade'); is no error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when laravel5 and laravel-generators ~3.0
error occurred when execute php artisan migrate
but
$table->integer('role_id')->unsigned()->index()->references('id')->on('roles')->onDelete('cascade');
is no error
The text was updated successfully, but these errors were encountered: