Unable to name constraints other than foreign keys
维护者通常 1 天内回复
@huydo862003 已经在做这个了。
开始于 2025年11月6日。
评估
这个 Issue 还没有评估数据。
描述
I'm attempting to give a name to some constraints.
For primary key I tried this (I'm using dbdiagram.io):
Table "department" {
"department_id" int [not null, increment]
Indexes {
department_id [name: "pk_department", pk]
}
}
Although, it looks like that is not possible:
Expected "name:", "note:", "type:", "unique", comment, or whitespace but "p" found.
Am I doing something wrong? Is this not supported?
I also would like to know if it is possible to name other constraints like default and unique (not the unique index, but the constraint)
Thank you.
- 主要语言
- JavaScript
- 星标
- 3.7k
- 派生
- 233
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 23
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
holistics/dbml 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
@dbml/core 12.0.0 Postgres importer: timestamptz becomes timestamp, schema-qualified type doubled, Ref with ?<? rejected by parser可能已有人在做 @zzoraemon043 于 2 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 38/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 48/100
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
holistics/dbml#868 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
mailcow/mailcow-dockerized#7677 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
gcivil-nyu-org/team5-mon-fall26#145 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
needs discussion
难度 2/5 1-3 小时 新手友好度 78/100
openfga/openfga.dev#1436 · 1 条评论 ·
维护者通常 2 天内回复