Files
Neo-ZQYY/.kiro/steering/db-docs.md

22 lines
643 B
Markdown
Raw Permalink 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.
---
inclusion: fileMatch
fileMatchPattern:
- "**/migrations/**/*.*"
- "**/*.sql"
- "**/*schema*.*"
- "**/*ddl*.*"
- "**/*.prisma"
---
# Database Schema Documentation Rules
当你修改任何可能影响 PostgreSQL schema/表结构的内容时(迁移脚本/DDL/表定义/ORM 模型):
1) 必须同步更新 BD 手册目录:
docs/database
2) 文档最低要求:
- 变更说明:新增/修改/删除的表、字段、约束、索引
- 兼容性:对 ETL、后端 API、小程序字段映射的影响
- 回滚策略如何撤销DDL 回滚 / 数据回填)
- 验证步骤:最少包含 3 条校验 SQL