pull/190/head watcha-20240614T175901-2a6e961
dlamarcheteamnet 5 months ago
parent 24baa2e569
commit 2a6e961289
  1. 0
      synapse/storage/schema/common/full_schemas/72/full.sql.postgres
  2. 0
      synapse/storage/schema/common/full_schemas/72/full.sql.sqlite
  3. 7
      synapse/storage/schema/main/delta/84/watcha_01partners_invited_by.sql
  4. 4
      synapse/storage/schema/main/delta/84/watcha_02room_mapping_with_Nextcloud.sql
  5. 1
      synapse/storage/schema/main/delta/84/watcha_03is_partner.sql
  6. 1
      synapse/storage/schema/main/delta/84/watcha_05share_id.sql
  7. 1
      synapse/storage/schema/main/delta/84/watcha_06nextcloud_username.sql
  8. 13
      synapse/storage/schema/main/delta/84/watcha_07partners_invitations.sql
  9. 12
      synapse/storage/schema/main/delta/84/watcha_08drop_directory_path_column.sql
  10. 0
      synapse/storage/schema/main/full_schemas/72/full.sql.postgres
  11. 0
      synapse/storage/schema/main/full_schemas/72/full.sql.sqlite
  12. 0
      synapse/storage/schema/state/full_schemas/72/full.sql.postgres
  13. 0
      synapse/storage/schema/state/full_schemas/72/full.sql.sqlite

@ -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…
Cancel
Save