Skip to content

Primary identifier for Check and Run db entities are not unique to manager #135

@FoxxMD

Description

@FoxxMD

Check and Run entities are using their name as the primary key. Even though they have a manager id relationship it is not used as part of a composite key.

This was for sure by accident and not intentional...for postgres, at least, this doesn't seem to cause immediate issues but for mysql/maria if a user tries to run CM with multiple subreddits using the same run/check names in each subreddit config CM will encounter db insert errors due to non-unique primary keys.

Solution is to use composite key or random id primary key. In either solution we will need to manually update result entities to match new key or truncate result tables during migration.

Metadata

Metadata

Assignees

Labels

DBDB specific problembugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions