[server] Fix unique constraint for ott for multiple apps
This commit is contained in:
parent
7c82b57ca0
commit
6bf22fa864
2 changed files with 13 additions and 0 deletions
11
server/migrations/83_fix_ott_index.down.sql
Normal file
11
server/migrations/83_fix_ott_index.down.sql
Normal 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;
|
2
server/migrations/83_fix_ott_index.up.sql
Normal file
2
server/migrations/83_fix_ott_index.up.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
DROP TRIGGER IF EXISTS update_location_tag_updated_at ON location_tag;
|
||||
DROP TABLE location_tag;
|
Loading…
Add table
Reference in a new issue