Skip to content

Commit b10fbd4

Browse files
committed
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.
1 parent f6ee27f commit b10fbd4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

database/migrations/2018_11_10_161142_create_tags_table.php renamed to database/migrations/2018_11_10_161442_create_tags_table.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
use Illuminate\Database\Migrations\Migration;
44
use Illuminate\Database\Schema\Blueprint;
55

6-
class CreateTagsTable extends Migration {
6+
class CreateTagsTable extends Migration
7+
{
78
/**
89
* Run the migrations.
910
*
1011
* @return void
1112
*/
12-
public function up() {
13+
public function up()
14+
{
1315
Schema::create('tags', function (Blueprint $table) {
1416
$table->increments('id');
1517
$table->string('name');
16-
$table->integer('user_id')->unsigned();
18+
$table->integer('user_id')->unsigned()->nullable();
1719
$table->integer('is_special_tag')->default('0');
1820
$table->timestamps();
1921

@@ -26,7 +28,8 @@ public function up() {
2628
*
2729
* @return void
2830
*/
29-
public function down() {
31+
public function down()
32+
{
3033
Schema::drop('tags');
3134
}
3235
}

0 commit comments

Comments
 (0)