Skip to content

Prevent duplicate runs in a dataset #28

Description

@claymcleod

The same run can be added to a dataset more than once, causing dataset queries and analyses to include duplicate samples.

The datasets_runs table has a nonunique index on (dataset_id, run_id), and dataset::add always inserts a new row. Repeating an ID in one command or running the command again creates duplicate membership rows.

The schema should enforce uniqueness for (dataset_id, run_id). Adding an existing membership should either be idempotent or return a clear conflict error. Tests should cover duplicate IDs in one request and repeated additions across requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions