Skip to content

Conditional uniqueness constraints; Partial/Filtered (Unique) Indexes #6974

@ArthurThornton

Description

@ArthurThornton

Problem

I would like to be able to define a uniqueness constraint that has conditional elements to it so that it can map to and align with a conditional unique index/constraint within the database.

Suggested solution

Modify the @@unique modifier to include a where: { } argument that could define the condition that allows this to be unique.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions