Page MenuHomePhabricator

D12351.id41110.diff
No OneTemporary

D12351.id41110.diff

diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js
--- a/keyserver/src/database/migration-config.js
+++ b/keyserver/src/database/migration-config.js
@@ -823,6 +823,16 @@
);
},
],
+ [
+ 65,
+ () =>
+ dbQuery(SQL`
+ ALTER TABLE invite_links
+ ADD COLUMN IF NOT EXISTS thread bigint(20) DEFAULT NULL,
+ ADD COLUMN IF NOT EXISTS thread_role bigint(20) NOT NULL,
+ ADD INDEX IF NOT EXISTS community_thread (community, thread);
+ `),
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());
diff --git a/keyserver/src/database/setup-db.js b/keyserver/src/database/setup-db.js
--- a/keyserver/src/database/setup-db.js
+++ b/keyserver/src/database/setup-db.js
@@ -279,7 +279,9 @@
expiration_time bigint(20),
limit_of_uses int UNSIGNED,
number_of_uses int UNSIGNED NOT NULL DEFAULT 0,
- blob_holder char(36) CHARSET latin1
+ blob_holder char(36) CHARSET latin1,
+ thread bigint(20) DEFAULT NULL,
+ thread_role bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE olm_sessions (
@@ -429,7 +431,8 @@
ALTER TABLE invite_links
ADD PRIMARY KEY (id),
ADD UNIQUE KEY (name),
- ADD INDEX community_primary (community, \`primary\`);
+ ADD INDEX community_primary (community, \`primary\`),
+ ADD INDEX community_thread (community, thread);
ALTER TABLE olm_sessions
ADD PRIMARY KEY (cookie_id, is_content);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 3:49 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580365
Default Alt Text
D12351.id41110.diff (1 KB)

Event Timeline