forked from 3wordchant/capsul-flask
fixing login email case sensitivity issues
This commit is contained in:
5
capsulflask/schema_migrations/09_down_email_case.sql
Normal file
5
capsulflask/schema_migrations/09_down_email_case.sql
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
ALTER TABLE accounts DROP COLUMN lower_case_email;
|
||||
ALTER TABLE accounts DROP COLUMN ever_logged_in;
|
||||
|
||||
UPDATE schemaversion SET version = 8;
|
10
capsulflask/schema_migrations/09_up_email_case.sql
Normal file
10
capsulflask/schema_migrations/09_up_email_case.sql
Normal file
@ -0,0 +1,10 @@
|
||||
ALTER TABLE accounts
|
||||
ADD COLUMN lower_case_email TEXT NULL;
|
||||
|
||||
ALTER TABLE accounts
|
||||
ADD COLUMN ever_logged_in BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
UPDATE accounts set lower_case_email = LOWER(accounts.email);
|
||||
UPDATE accounts set ever_logged_in = TRUE;
|
||||
|
||||
UPDATE schemaversion SET version = 9;
|
Reference in New Issue
Block a user