haskell-beam / haskell-beam/beam

Composite column constraints

Open
#551 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
635
Forks
193
PR merge metrics
No merged PRs in 30d

Description

Is there any way to add constraints to column composites? For example, I'd like to impose a uniqueness constraint to a pair of columns directly in Beam. Should I just delegate this to raw SQL commands?

CREATE TABLE someTable (
id serial PRIMARY KEY,
col1 int NOT NULL,
col2 int NOT NULL,
UNIQUE (col1, col2)
)

I can get around it for now by making it a composite primary key, but I really don't want to do that.

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.