fujian_water_biz_doc/docs/evidence/rev004-latefee-formal-table-deploy-sql-2026-04-15.md

28 lines
915 B
Markdown
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.

# REV004 late-fee formal table 部署 SQL 说明2026-04-15
## 新增脚本
- `sql/rev004/REV004_latefee_formal_tables_deploy.sql`
## 作用
为 late-fee reduce 的新 formal table 提供单独部署脚本,覆盖:
- `biz_latefee_reduce`
- `biz_latefee_reduce_detail`
- 对应 sequence
- 主键 / 唯一索引 / 常用索引
- 明细表外键
## 适用场景
1. 测试库 / 联调库先补表
2. 为真实 DB canary 排除“缺表”阻塞
3. 为后续 formal-table 路线提供独立部署入口
## 注意事项
- 当前脚本按 PostgreSQL / 测试环境风格编写
- 若正式环境不是 PostgreSQL需先做方言适配
- 此脚本只覆盖 late-fee 两张表,不包含坏账 / 核销 / 价差等对象
## 建议使用顺序
1. 先在目标库执行 `REV004_latefee_formal_tables_deploy.sql`
2. 再重跑 late-fee date-mode canary
3. 若通过,再考虑推广 formal-table 到其他对象