17 lines
524 B
PL/PgSQL
17 lines
524 B
PL/PgSQL
-- 退休非正式 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;
|