hasura / hasura/graphql-engine

Feature Request: Expand unique constraint type in api

Open
#7,802 0 comments 2 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

Dear Hasura,

### Describe the solution you'd like

It would be great if a more unusual type of unique constraint was available to use in the api for upserting:

```sql
create unique index test_key on content_decisions(greatest(model1_id,model2_id), least(model1_id,model2_id));
```

(example from https://stackoverflow.com/questions/30036837/postgresql-enforce-unique-two-way-combination-of-columns)

### If the feature is approved, would you be willing to submit a PR?

Apologies, I can't.

Thanks for consideration :)

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.