From 886110deed98690b1a78e2cca01ffcd50204177a Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Fri, 23 Jan 2026 13:00:14 +0100 Subject: [PATCH] DB migration to unassign deleted tags --- .../20260123123229_unassign_deleted_tags.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 db/migrations/20260123123229_unassign_deleted_tags.php 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); + } +}