Skip to content

Commit 8f011b7

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 8f011b7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
6+
class CreateTagsTable extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
16+
Schema::table('tags', function (Blueprint $table) {
17+
$table->integer('user_id')->unsigned()->nullable();
18+
});
19+
}
20+
21+
/**
22+
* Reverse the migrations.
23+
*
24+
* @return void
25+
*/
26+
public function down()
27+
{
28+
$table->integer('user_id')->unsigned();
29+
}
30+
}

0 commit comments

Comments
 (0)