Skip to content

Commit

Permalink
Update 2016_02_09_132439_create_permission_user_table.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykenedy committed Aug 4, 2020
1 parent 5387031 commit 3398a62
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -22,8 +22,8 @@ public function up()
if (!$tableCheck) {
Schema::connection($connection)->create($table, function (Blueprint $table) use ($permissionsTable, $userTable) {
$table->increments('id')->unsigned();
$table->integer('role_id')->unsigned()->index();
$table->foreign('role_id')->references('id')->on($permissionsTable)->onDelete('cascade');
$table->integer('permission_id')->unsigned()->index();
$table->foreign('permission_id')->references('id')->on($permissionsTable)->onDelete('cascade');
$table->unsignedBigInteger('user_id')->unsigned()->index();
$table->foreign('user_id')->references('id')->on($userTable)->onDelete('cascade');
$table->timestamps();
Expand Down

0 comments on commit 3398a62

Please sign in to comment.