Skip to content

Commit d159d95

Browse files
committed
fix migration
1 parent c218287 commit d159d95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

database/migrations/2017_03_19_023020_create_documenttags_table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ class CreateDocumentTagsTable extends Migration
1313
public function up()
1414
{
1515
Schema::create('document_tags', function (Blueprint $table) {
16-
$table->integer('id');
16+
$table->integer('document_id')->unsigned();
1717
$table->string('tag');
18+
$table->foreign('document_id')->references('id')->on('documents');
1819
});
1920
}
2021

0 commit comments

Comments
 (0)