From c9108170e6af590df4802e41c904cf3f33224042 Mon Sep 17 00:00:00 2001 From: Damilola Olowookere Date: Mon, 30 Mar 2020 07:53:03 +0100 Subject: [PATCH] make user_id nullable in tags table This enables support for the system notification feature, since (system) notification tags does not necessarily belong to any user. --- .../2018_11_10_161142_create_tags_table.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/database/migrations/2018_11_10_161142_create_tags_table.php b/database/migrations/2018_11_10_161142_create_tags_table.php index 27d268f..5c38c85 100644 --- a/database/migrations/2018_11_10_161142_create_tags_table.php +++ b/database/migrations/2018_11_10_161142_create_tags_table.php @@ -3,17 +3,19 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -class CreateTagsTable extends Migration { +class CreateTagsTable extends Migration +{ /** * Run the migrations. * * @return void */ - public function up() { + public function up() + { Schema::create('tags', function (Blueprint $table) { $table->increments('id'); $table->string('name'); - $table->integer('user_id')->unsigned(); + $table->integer('user_id')->unsigned()->nullable(); $table->integer('is_special_tag')->default('0'); $table->timestamps(); @@ -26,7 +28,8 @@ public function up() { * * @return void */ - public function down() { + public function down() + { Schema::drop('tags'); } }