实现审计覆盖门禁与外部集成日志闭环
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 10m19s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 10m19s
This commit is contained in:
11
migrations/000167_create_audit_integration_log.down.sql
Normal file
11
migrations/000167_create_audit_integration_log.down.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- 已产生外部交互事实后禁止通过降级删除,避免链路历史丢失。
|
||||
DO $$
|
||||
BEGIN
|
||||
IF to_regclass('tb_integration_log') IS NOT NULL
|
||||
AND EXISTS (SELECT 1 FROM tb_integration_log LIMIT 1) THEN
|
||||
RAISE EXCEPTION 'tb_integration_log 已存在外部交互事实,禁止删表回滚,请停止生产者后向前修复';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
DROP TABLE IF EXISTS tb_integration_log;
|
||||
Reference in New Issue
Block a user