holistics / holistics/dbml

Unable to name constraints other than foreign keys

Open
#403 1 comment 1 reaction 1 assignee Claimed by @huydo862003 View on GitHub
enhancement
Dominant language
JavaScript
Stars
3.7k
Forks
233
Avg merge
1d 23h
Merged PRs (30d)
4

Description

I'm attempting to give a name to some constraints.
For primary key I tried this (I'm using dbdiagram.io):

```dbml
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.