Skip to content

Commit

Permalink
fix: migration assumes flarum/tags has been installed (#191)
Browse files Browse the repository at this point in the history
* fix: migration assumes flarum/tags has been installed

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Dec 15, 2023
1 parent 8ced967 commit 10770e1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@

return [
'up' => function (Builder $schema) {
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();
if ($schema->hasTable('discussion_tag')) {
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();

$connection->statement("DELETE FROM {$prefix}discussion_tag WHERE discussion_id IN (SELECT DISTINCT(discussion_id) FROM {$prefix}recipients)");
$connection->statement("DELETE FROM {$prefix}discussion_tag WHERE discussion_id IN (SELECT DISTINCT(discussion_id) FROM {$prefix}recipients)");
}
},
'down' => function (Builder $schema) {
//
Expand Down

0 comments on commit 10770e1

Please sign in to comment.