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 b10fbd4
Showing 1 changed file with 7 additions and 4 deletions.
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 b10fbd4

Please sign in to comment.