Add unique constraints for login and email on the admins table

Description

We are enforcing uniqueness on admin logins and emails in Rails but not at the database level.

Since this is a small table, we can use standard Rails migrations instead of pt-online-schema-change.

We can also remove a validation on emails that is already added by Devise's validatable module.

To test, run the migration on staging and make sure it's successful.

Activity

Show:
Sarken
July 9, 2020, 5:44 AM

Migrated up, down, and back up just fine! (Save the known issue with it yelling about mysqldump, of course.)

DeployedToBeta

Assignee

Tom Milligan

Reporter

redsummernight

Roadmap

Admin

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Easy

Milestone

Internal 0.9
Configure