Skip to content

Commit

Permalink
Release hotfix
Browse files Browse the repository at this point in the history
Migrations : Fix fonts and player software migrations. (#2043) (#2044)
Co-authored-by: Peter <[email protected]>
  • Loading branch information
dasgarner authored Sep 4, 2023
1 parent 768e4e1 commit 8134122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/migrations/20220915100902_add_fonts_table_migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function change()
);

// remove any potential widget links (there shouldn't be any)
$this->execute('DELETE FROM `lktagmedia` WHERE `lktagmedia`.`mediaId` = ' . $fontMedia['mediaId']);
$this->execute('DELETE FROM `lkwidgetmedia` WHERE `lkwidgetmedia`.`mediaId` = ' . $fontMedia['mediaId']);

// remove any potential tagLinks from font media files
// otherwise we risk failing the migration on the next step when we remove records from media table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function change()
// move the stored files with new id to fonts folder
rename($libraryLocation . $playersoftwareMedia['storedAs'], $libraryLocation . 'playersoftware/' . $playersoftwareMedia['originalFileName']);

// remove any potential widget links (there shouldn't be any)
$this->execute('DELETE FROM `lkwidgetmedia` WHERE `lkwidgetmedia`.`mediaId` = ' . $playersoftwareMedia['mediaId']);

// remove any potential tagLinks from playersoftware media files
// unlikely that there will be any, but just in case.
$this->execute('DELETE FROM `lktagmedia` WHERE `lktagmedia`.mediaId = ' . $playersoftwareMedia['mediaId']);
Expand Down

0 comments on commit 8134122

Please sign in to comment.