Skip to content
Permalink
Browse files

fix foreign key on category

  • Loading branch information...
Tim S Tim S
Tim S authored and Tim S committed May 25, 2019
1 parent 109b442 commit e34422e0680ccb0392dfdc7531794b474c8626d3
Showing with 3 additions and 1 deletion.
  1. +3 −1 database/migrations/2019_05_11_144019_add_category_rooms.php
@@ -14,7 +14,9 @@ class AddCategoryRooms extends Migration
public function up()
{
Schema::table('rooms', function (Blueprint $table) {
$table->integer('category_id')->unsigned();
$table->integer('category_id')->unsigned()->nullable();
$table->foreign('category_id')->references('id')->on('categories');
});
}

0 comments on commit e34422e

Please sign in to comment.
You can’t perform that action at this time.