ce-add-memberships-constraint Add unique index to memberships to avoid duplicate records

The memberships table does not currently have any constraints/indexes to
prevent duplicate entries, e.g. it is theoretically possible to have a
membership record where a user is a member and admin simultaneously, or
two admin/member records;

Before this was applied, we had a small amount of records keeping us
from applying the index. The first part of the migration therefore deletes those
offending records; the second part then creates the index.

Dropping the migration will remove the index.

Curtis Ekstrom avatar Curtis Ekstrom

Push event #1002 failed

  • Ran for
AMD64
Ruby: 2.3.4
Git
RAILS_ENV=test

There was an error while trying to fetch the log.