Unable to name constraints other than foreign keys

Đang mở
#403 1 bình luận 1 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@huydo862003 đang làm issue này rồi.

Từ ngày 6/11/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

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.

Ngôn ngữ chính
JavaScript
Star
3.7k
Fork
233
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của holistics/dbml

Tất cả issue của holistics/dbml

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.