diff --git a/database/migrations/2020_01_01_140000_create_keywords_table.php b/database/migrations/2020_01_01_140000_create_keywords_table.php index 171ac28..ef72b71 100644 --- a/database/migrations/2020_01_01_140000_create_keywords_table.php +++ b/database/migrations/2020_01_01_140000_create_keywords_table.php @@ -14,8 +14,8 @@ public function up() Schema::create('keywords', function (Blueprint $table) { $table->id(); $table->string('phrase')->index()->unique(); - - // Add nullable keyword_type_id + $table->string('type')->index(); + $table->foreignIdFor(Keyword::class, 'parent_id')->nullable(); $table->foreignIdFor(app('user'), 'creator_id'); $table->foreignIdFor(app('user'), 'updater_id');