From 121990a941ee6bbf536980f1f3cb7b1ef64e7470 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 21 Oct 2021 13:42:29 +0200 Subject: [PATCH] fix: [plugin:tags] Database migration --- .../config/Migrations/20210831121348_TagSystem.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/Tags/config/Migrations/20210831121348_TagSystem.php b/plugins/Tags/config/Migrations/20210831121348_TagSystem.php index 7b15623..bb2e412 100644 --- a/plugins/Tags/config/Migrations/20210831121348_TagSystem.php +++ b/plugins/Tags/config/Migrations/20210831121348_TagSystem.php @@ -7,8 +7,8 @@ use Migrations\AbstractMigration; class TagSystem extends AbstractMigration { public function change() { - $tags = $this->table('tags_tags') - ->addColumn('namespace', 'string', [ + $tags = $this->table('tags_tags'); + $tags->addColumn('namespace', 'string', [ 'default' => null, 'limit' => 255, 'null' => true, @@ -50,8 +50,8 @@ class TagSystem extends AbstractMigration ]) ->create(); - $tagged = $this->table('tags_tagged') - ->addColumn('tag_id', 'integer', [ + $tagged = $this->table('tags_tagged'); + $tagged->addColumn('tag_id', 'integer', [ 'default' => null, 'null' => false, 'signed' => false, @@ -83,7 +83,7 @@ class TagSystem extends AbstractMigration $tags->addIndex(['name'], ['unique' => true]) ->update(); - $tagged->addIndex(['tag_id', 'fk_id', 'fk_table'], ['unique' => true]) + $tagged->addIndex(['tag_id', 'fk_id', 'fk_model'], ['unique' => true]) ->update(); } } \ No newline at end of file