business: add privacy-aware user projection
(cherry picked from commit a636192ef22ee69d792b0ca7db1c6be963be9cb2)
This commit is contained in:
parent
14d220c971
commit
8ff3343ae0
29 changed files with 2239 additions and 112 deletions
|
|
@ -0,0 +1,26 @@
|
|||
DROP INDEX IF EXISTS contacts_personal_photo_idx;
|
||||
|
||||
ALTER TABLE contacts
|
||||
DROP COLUMN IF EXISTS personal_photo_date,
|
||||
DROP COLUMN IF EXISTS personal_photo_id;
|
||||
|
||||
DROP INDEX IF EXISTS profile_photos_current_idx;
|
||||
|
||||
ALTER TABLE profile_photos
|
||||
DROP CONSTRAINT IF EXISTS profile_photos_kind_check;
|
||||
|
||||
ALTER TABLE profile_photos
|
||||
DROP CONSTRAINT IF EXISTS profile_photos_pkey;
|
||||
|
||||
ALTER TABLE profile_photos
|
||||
ADD CONSTRAINT profile_photos_pkey PRIMARY KEY (owner_peer_type, owner_peer_id, photo_id);
|
||||
|
||||
ALTER TABLE profile_photos
|
||||
DROP COLUMN IF EXISTS kind;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS profile_photos_current_idx
|
||||
ON profile_photos (owner_peer_type, owner_peer_id, sort_order DESC)
|
||||
WHERE active;
|
||||
|
||||
DROP TABLE IF EXISTS account_privacy_rules;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue