Skip to content

Commit

Permalink
make user_id nullable in tags table
Browse files Browse the repository at this point in the history
This enables support for the system notification feature, since
(system) notification tags does not necessarily belong to any user.
  • Loading branch information
damms005 committed Mar 30, 2020
1 parent f6ee27f commit c910817
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions database/migrations/2018_11_10_161142_create_tags_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -26,7 +28,8 @@ public function up() {
*
* @return void
*/
public function down() {
public function down()
{
Schema::drop('tags');
}
}

0 comments on commit c910817

Please sign in to comment.