Skip to content

Commit

Permalink
Revert dropping foreign eye
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Aug 5, 2024
1 parent 191a511 commit 39c1af2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/migrations/m240709_120000_add_fieldinstanceuid_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ public function safeUp(): bool
{
if ($this->db->columnExists(ElementFieldCacheRecord::tableName(), 'fieldId')) {
ElementFieldCacheRecord::deleteAll();
$this->dropForeignKeyIfExists(ElementFieldCacheRecord::tableName(), ['fieldId']);
$this->dropColumn(ElementFieldCacheRecord::tableName(), 'fieldId');
$this->addColumn(ElementFieldCacheRecord::tableName(), 'fieldInstanceUid', $this->uid()->after('elementId'));
}

if ($this->db->columnExists(ElementQueryFieldRecord::tableName(), 'fieldId')) {
ElementQueryFieldRecord::deleteAll();
$this->dropForeignKeyIfExists(ElementQueryFieldRecord::tableName(), ['fieldId']);
$this->dropColumn(ElementQueryFieldRecord::tableName(), 'fieldId');
$this->addColumn(ElementQueryFieldRecord::tableName(), 'fieldInstanceUid', $this->uid()->after('queryId'));
}
Expand Down

0 comments on commit 39c1af2

Please sign in to comment.