fix: [migrations] correct string length to avoid strict mode issues with keys exceeding 767 bytes

pull/85/head
iglocska 2022-01-11 10:21:03 +01:00
parent 4dedb4702b
commit 229fd98b8e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 6 additions and 6 deletions

View File

@ -10,22 +10,22 @@ class TagSystem extends AbstractMigration
$tags = $this->table('tags_tags'); $tags = $this->table('tags_tags');
$tags->addColumn('namespace', 'string', [ $tags->addColumn('namespace', 'string', [
'default' => null, 'default' => null,
'limit' => 255, 'limit' => 191,
'null' => true, 'null' => true,
]) ])
->addColumn('predicate', 'string', [ ->addColumn('predicate', 'string', [
'default' => null, 'default' => null,
'limit' => 255, 'limit' => 191,
'null' => true, 'null' => true,
]) ])
->addColumn('value', 'string', [ ->addColumn('value', 'string', [
'default' => null, 'default' => null,
'limit' => 255, 'limit' => 191,
'null' => true, 'null' => true,
]) ])
->addColumn('name', 'string', [ ->addColumn('name', 'string', [
'default' => null, 'default' => null,
'limit' => 255, 'limit' => 191,
'null' => false, 'null' => false,
]) ])
->addColumn('colour', 'string', [ ->addColumn('colour', 'string', [
@ -66,7 +66,7 @@ class TagSystem extends AbstractMigration
]) ])
->addColumn('fk_model', 'string', [ ->addColumn('fk_model', 'string', [
'default' => null, 'default' => null,
'limit' => 255, 'limit' => 191,
'null' => false, 'null' => false,
'comment' => 'The model name of the entity being tagged' 'comment' => 'The model name of the entity being tagged'
]) ])
@ -86,4 +86,4 @@ class TagSystem extends AbstractMigration
$tagged->addIndex(['tag_id', 'fk_id', 'fk_model'], ['unique' => true]) $tagged->addIndex(['tag_id', 'fk_id', 'fk_model'], ['unique' => true])
->update(); ->update();
} }
} }