db: add better comment about migration
This commit is contained in:
parent
01a24542e9
commit
4feaae98b0
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
-- +migrate Up
|
||||
|
||||
-- This migration is a fix for a bug that allowed duplicate emails if they used different cases (see #338).
|
||||
-- When migrating, dex will not take the liberty of deleting rows for duplicate cases. Instead it will
|
||||
-- raise an exception and call for an admin to remove duplicates manually.
|
||||
|
||||
CREATE OR REPLACE FUNCTION raise_exp() RETURNS VOID AS $$
|
||||
BEGIN
|
||||
RAISE EXCEPTION 'Found duplicate emails when using case insensitive comparision, cannot perform migration.';
|
||||
|
|
|
@ -425,7 +425,7 @@ func (r *userRepo) insertRemoteIdentity(tx repo.Transaction, userID string, ri u
|
|||
|
||||
type userModel struct {
|
||||
ID string `db:"id"`
|
||||
Email string `db:"email"` // NOTE(ericchiang): When making comparisions emails are case insensitive.
|
||||
Email string `db:"email"`
|
||||
EmailVerified bool `db:"email_verified"`
|
||||
DisplayName string `db:"display_name"`
|
||||
Disabled bool `db:"disabled"`
|
||||
|
|
Reference in a new issue