mirror of https://github.com/watcha-fr/synapse
parent
24baa2e569
commit
2a6e961289
@ -0,0 +1,7 @@ |
||||
CREATE TABLE IF NOT EXISTS partners_invited_by ( |
||||
partner TEXT NOT NULL, -- The user_id created for the partner. |
||||
invited_by TEXT NOT NULL, -- The user_id of the inviter. |
||||
invitation_ts BIGINT NOT NULL, |
||||
device_id TEXT, |
||||
email_sent SMALLINT NOT NULL DEFAULT 0 |
||||
); |
@ -0,0 +1,4 @@ |
||||
CREATE TABLE IF NOT EXISTS room_nextcloud_mapping ( |
||||
room_id TEXT NOT NULL PRIMARY KEY, -- The room ID of the room which initiate a share with Nextcloud. |
||||
directory_path TEXT -- The Nextcloud directory path to share in the room. |
||||
); |
@ -0,0 +1 @@ |
||||
ALTER TABLE users ADD COLUMN is_partner SMALLINT DEFAULT 0 NOT NULL; |
@ -0,0 +1 @@ |
||||
ALTER TABLE room_nextcloud_mapping ADD COLUMN share_id INTEGER; |
@ -0,0 +1 @@ |
||||
ALTER TABLE user_external_ids ADD COLUMN nextcloud_username TEXT; |
@ -0,0 +1,13 @@ |
||||
CREATE TABLE IF NOT EXISTS partners_invitations ( |
||||
user_id TEXT NOT NULL, |
||||
invited_by TEXT, -- The user_id of the sender. |
||||
CONSTRAINT partners_invitations_uniqueness UNIQUE (user_id, invited_by) |
||||
); |
||||
|
||||
INSERT INTO partners_invitations |
||||
SELECT DISTINCT |
||||
partner, |
||||
invited_by |
||||
FROM partners_invited_by; |
||||
|
||||
DROP TABLE partners_invited_by; |
@ -0,0 +1,12 @@ |
||||
CREATE TABLE IF NOT EXISTS watcha_nextcloud_shares ( |
||||
room_id TEXT NOT NULL PRIMARY KEY, |
||||
share_id INTEGER |
||||
); |
||||
|
||||
INSERT INTO watcha_nextcloud_shares |
||||
SELECT DISTINCT |
||||
room_id, |
||||
share_id |
||||
FROM room_nextcloud_mapping; |
||||
|
||||
DROP TABLE room_nextcloud_mapping; |
Loading…
Reference in new issue