实现七月迭代公共技术基础
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
This commit is contained in:
11
migrations/000165_create_public_outbox.down.sql
Normal file
11
migrations/000165_create_public_outbox.down.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- 已产生可靠事件后禁止通过降级删除事实,只允许空表回滚。
|
||||
DO $$
|
||||
BEGIN
|
||||
IF to_regclass('tb_outbox_event') IS NOT NULL
|
||||
AND EXISTS (SELECT 1 FROM tb_outbox_event LIMIT 1) THEN
|
||||
RAISE EXCEPTION 'tb_outbox_event 已存在事件事实,禁止删表回滚,请停止生产者和 Relay 后向前修复';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
DROP TABLE IF EXISTS tb_outbox_event;
|
||||
Reference in New Issue
Block a user