[server] Fix unique constraint for ott for multiple apps

This commit is contained in:
Neeraj Gupta 2024-04-09 11:07:59 +05:30
parent 7c82b57ca0
commit 6bf22fa864
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,11 @@
-- Add unique index on otts for email_hash,app,ott
BEGIN;
ALTER TABLE
otts DROP CONSTRAINT unique_otts_emailhash_ott;
ALTER TABLE
otts
ADD
CONSTRAINT unique_otts_emailhash_app_ott UNIQUE (ott,app, email_hash);
COMMIT;

View file

@ -0,0 +1,2 @@
DROP TRIGGER IF EXISTS update_location_tag_updated_at ON location_tag;
DROP TABLE location_tag;