跳至正文
跳到正文
Wener Notes

Schema Migration

约 1 分钟阅读

Design Schema Migration

  • 既要 fact schema
    • 当前 DB Schema 状态,准确的 create 信息
    • Single Source Of Truth
  • 又要 migration schema
    • 记录历史变更
    • 支持回滚
    • 版本控制

atlas

    • 支持两种模式 - schema / migration
    • schema 支持 sql / dsl / hcl / json
    • migration 支持特殊的 template / instruction

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • Schema Design
    笔记 · Migration

    Rule - 命名、标识边界、枚举大小写、事实数据、PostgreSQL 约束与 i18n 规则。 · Pattern - CQRS(Command+Event+Message+Snapshot)、Task Lease、不可变事实数据、双轨模型与专项模式:

  • Schema Pattern
    笔记 · Migration

    Resource - 资源表、基础字段、来源字段与扩展字段。 · State - / / / reason / 软删除。 · Ownership - 、、、visibility、共享授权。 · Auth - AuthN、AuthZ、access token、permission grant、RBAC 边界。

参考资料

GitHub1 条
最近更新commit 8f6dcd8编辑