Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE "products" (
"id" uuid PRIMARY KEY,
"kind" text NOT NULL,
"name" text
);

ALTER TABLE ONLY "products"
ADD CONSTRAINT "products_kind_name_key" UNIQUE NULLS NOT DISTINCT ("kind", "name");
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Table "products" {
"id" uuid [pk]
"kind" text [not null]
"name" text

Indexes {
(kind, name) [unique, name: "products_kind_name_key"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,10 @@ tableconstraint
| constraintelem
;

// Note: changed from orginal
constraintelem
: CHECK OPEN_PAREN a_expr CLOSE_PAREN constraintattributespec
| UNIQUE (
| UNIQUE nulls_distinct? (
OPEN_PAREN columnlist CLOSE_PAREN c_include_? definition_? optconstablespace? constraintattributespec
| existingindex constraintattributespec
)
Expand Down

Large diffs are not rendered by default.

Loading
Loading