id(); $table->string('href', 4096); $table->string('title', 1024); $table->text('description'); $table->timestamps(); } ); Schema::create( 'tags', function (Blueprint $table) { $table->id(); $table->string('name', 255)->unique(); $table->timestamps(); } ); Schema::create( 'bookmark_tag', function (Blueprint $table) { $table->foreignIdFor(Bookmark::class); $table->foreignIdFor(Tag::class); $table->primary(['bookmark_id', 'tag_id']); $table->timestamps(); } ); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('bookmarks'); Schema::dropIfExists('tags'); Schema::dropIfExists('bookmark_tag'); } };