Files
Agent-System/scripts/retire-nonofficial-workflow-definitions.sql

17 lines
524 B
PL/PgSQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 退休非正式 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;