chg: [migration] Finalized more-metafields-column script

pull/93/head
Sami Mokaddem 2022-02-21 11:32:17 +01:00
parent 7ea5acb167
commit 3c177254d0
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 3 deletions

View File

@ -33,14 +33,12 @@ class MoreMetaFieldColumns extends AbstractMigration
'signed' => false, 'signed' => false,
'comment' => 'Field used by the CounterCache behaviour to count the occurence of meta_template_fields' 'comment' => 'Field used by the CounterCache behaviour to count the occurence of meta_template_fields'
]) ])
->addForeignKey('meta_template_id', 'meta_templates', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])
->update(); ->update();
$metaTemplate = $this->table('meta_templates') $metaTemplate = $this->table('meta_templates')
->removeIndex(['uuid']) ->removeIndex(['uuid'])
->addIndex(['uuid', 'version']) ->addIndex(['uuid', 'version'])
->update(); ->update();
// TODO: Make sure FK constraints are set between meta_field, meta_template and meta_template_fields
// TODO: Make sure to add constraints on meta_template `uuid` and `version`
} }
} }