From 82b186172c3cfc7db0f448ccb6631cbfcfa80b22 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 000000000..fb2e950f6 --- /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); + } +}