From 1fb73937631f9d6111aa3fececebd10a77be4aa9 Mon Sep 17 00:00:00 2001 From: weichen Date: Sat, 12 Sep 2026 16:53:00 +0000 Subject: [PATCH] =?UTF-8?q?chore(ops):=20=E6=96=B0=E5=A2=9E=E9=80=80?= =?UTF-8?q?=E4=BC=91=E9=9D=9E=E6=AD=A3=E5=BC=8F=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../retire-nonofficial-workflow-definitions.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/retire-nonofficial-workflow-definitions.sql diff --git a/scripts/retire-nonofficial-workflow-definitions.sql b/scripts/retire-nonofficial-workflow-definitions.sql new file mode 100644 index 00000000..9ed66658 --- /dev/null +++ b/scripts/retire-nonofficial-workflow-definitions.sql @@ -0,0 +1,16 @@ +-- 退休非正式 active 工作流定义(保留 main / product_manager / test_manager) +-- Dry-run: +-- SELECT def_key, status FROM workflow_definitions +-- WHERE status = 'active' AND def_key NOT IN ('main','product_manager','test_manager'); +-- 用法: +-- psql "$DATABASE_URL" -f scripts/retire-nonofficial-workflow-definitions.sql + +BEGIN; + +UPDATE workflow_definitions +SET status = 'retired', + updated_at = now() +WHERE status = 'active' + AND def_key NOT IN ('main', 'product_manager', 'test_manager'); + +COMMIT;