completionId: cgen-a48df6046fc248f6b36cc72b455e51a2
cgen-a48df6046fc248f6b36cc72b455e51a2
This commit is contained in:
parent
6b1b2d2ac1
commit
733ccf2df6
1 changed files with 4 additions and 2 deletions
|
|
@ -63,11 +63,13 @@ CREATE TRIGGER update_user_email_links_updated_at
|
|||
FOR EACH ROW
|
||||
EXECUTE FUNCTION update_user_email_links_timestamp();
|
||||
|
||||
-- Add flag to user_profiles to mark dev accounts
|
||||
-- Add flag to user_profiles to mark dev accounts and track merged accounts
|
||||
ALTER TABLE user_profiles
|
||||
ADD COLUMN IF NOT EXISTS is_dev_account BOOLEAN DEFAULT FALSE,
|
||||
ADD COLUMN IF NOT EXISTS primary_email TEXT;
|
||||
ADD COLUMN IF NOT EXISTS primary_email TEXT,
|
||||
ADD COLUMN IF NOT EXISTS merged_to_user_id UUID REFERENCES user_profiles(user_id) ON DELETE SET NULL;
|
||||
|
||||
-- Create index for dev account lookup
|
||||
CREATE INDEX IF NOT EXISTS idx_user_profiles_is_dev_account ON user_profiles(is_dev_account);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_profiles_primary_email ON user_profiles(primary_email);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_profiles_merged_to ON user_profiles(merged_to_user_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue