Encourage not to use serial in newer PostgreSQL versions

未关闭
#229 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript, postgresql
领域
databases

调研方向

从 packages/dbml-core/src/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs 约第 140 行开始,这里 issue 指出了 parser 的修改位置。阅读周围的 PostgreSQL CREATE TABLE grammar 和现有的 parser 测试,然后验证 GENERATED BY DEFAULT AS IDENTITY 是否被接受为 serial 的预期替代方案。

由索引模型根据 Issue 内容生成。

描述

Hello,

Since PostgreSQL 10, usage of serial is not recommended. So, I guess it's better to suggest the usage of GENERATED BY DEFAULT AS IDENTITY. First reason PostgreSQL's approach is not how things are done in SQL standard. With this change, things are done similarly to DB2 and Oracle. The following snippet is where this support can be implemented.

https://github.com/holistics/dbml/blob/5a5513e0bdf7104e12b4e8e98bf88d99aca7c493/packages/dbml-core/src/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs#L140

主要语言
JavaScript
星标
3.7k
派生
233
平均合并
2 天 4 小时
30 天内合并 PR
23

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

holistics/dbml 的其他 Issue

查看 holistics/dbml 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。