pipeline-app/deploy/migrations/m0020_pipeline_dist_removal.json

16 lines
1.2 KiB
JSON
Raw 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.

{
"id": "m0020",
"title": "pipeline_dist模块删除(功能与supplychain重复):DROP两表+清码表+清RBAC权限。含破坏性语句——2026-09-10批评会决议用户已认可(同m0027批次,测试机2026-09-10已执行,两表0行数据)。生产2026-09-14追平执行前实测distributors/distributor_pipeline均0行。⚠supplychain的sub_distributor*权限行不受影响(path前缀不同)",
"destructive": true,
"backup_tables": ["distributors", "distributor_pipeline", "appcodes", "appcodes_kv", "permission", "rolepermission"],
"up": [
{"op": "sql", "sql": "DROP TABLE IF EXISTS distributor_pipeline"},
{"op": "sql", "sql": "DROP TABLE IF EXISTS distributors"},
{"op": "sql", "sql": "DELETE FROM appcodes_kv WHERE parentid IN ('distributor_status','markup_type','dp_status')"},
{"op": "sql", "sql": "DELETE FROM appcodes WHERE id IN ('distributor_status','markup_type','dp_status')"},
{"op": "sql", "sql": "DELETE FROM rolepermission WHERE permid IN (SELECT id FROM permission WHERE path LIKE '/pipeline_dist%' OR name LIKE '%pipeline_dist%')"},
{"op": "sql", "sql": "DELETE FROM permission WHERE path LIKE '/pipeline_dist%' OR name LIKE '%pipeline_dist%'"}
],
"down": []
}