Skip to content

Strategies to avoid constraint creation would fails? #13

@janpio

Description

@janpio

The README states:

If you have a unique index on a foreign key column then there are chance the constraint creation would fail, since mockd doesn't pick up unique value for foriegn key value it picks up random values from the reference table.

For me this manifested in this query being listed in a log file:

ALTER TABLE public.playlisttrack ADD CONSTRAINT pk_playlisttrack PRIMARY KEY (playlistid, trackid);

On checking the data manually, I see this:
image

So yes indeed, this PK could not be recreated.


Are there any strategies to avoid this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions