实现七月迭代公共技术基础
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/000166_create_system_config.down.sql
Normal file
11
migrations/000166_create_system_config.down.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- 已产生配置事实后禁止通过降级删除,只允许空表回滚。
|
||||
DO $$
|
||||
BEGIN
|
||||
IF to_regclass('tb_system_config') IS NOT NULL
|
||||
AND EXISTS (SELECT 1 FROM tb_system_config LIMIT 1) THEN
|
||||
RAISE EXCEPTION 'tb_system_config 已存在配置事实,禁止删表回滚,请停止写入后向前修复';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
DROP TABLE IF EXISTS tb_system_config;
|
||||
Reference in New Issue
Block a user