diff --git a/db/migrations/20260123123229_unassign_deleted_tags.php b/db/migrations/20260123123229_unassign_deleted_tags.php new file mode 100644 index 00000000..fb2e950f --- /dev/null +++ b/db/migrations/20260123123229_unassign_deleted_tags.php @@ -0,0 +1,17 @@ +execute(' + UPDATE tags_relations tr + INNER JOIN tags t ON t.id = tr.tag_id + SET tr.deleted_on = t.deleted, tr.deleted_by_id = 1 + WHERE tr.deleted_on IS NULL AND t.deleted > 0 + '); + $this->output->writeln('Updated rows: '.$updated_rows); + } +}