feat: password reset
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- Reverting this requires backfilling NULL emails with synthetic values
|
||||
-- first; left as a manual step (see operational runbook).
|
||||
ALTER TABLE users ALTER COLUMN email SET NOT NULL;
|
||||
@@ -0,0 +1,10 @@
|
||||
-- Some auth providers (Facebook in particular) let users sign up without
|
||||
-- linking a verified email — phone-only accounts and accounts whose owner
|
||||
-- declined the `email` permission both fall under this. To accept those
|
||||
-- users we need to allow NULL on users.email.
|
||||
--
|
||||
-- The UNIQUE constraint stays put: Postgres treats NULLs as distinct under
|
||||
-- a regular UNIQUE index (multiple rows with NULL email are allowed) so
|
||||
-- nothing breaks for OAuth-only users with no address on file. Real email
|
||||
-- addresses are still de-duplicated, exactly as before.
|
||||
ALTER TABLE users ALTER COLUMN email DROP NOT NULL;
|
||||
Reference in New Issue
Block a user