Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3373540
D7463.id25214.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7463.id25214.diff
View Options
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
@@ -325,6 +325,23 @@
await dbQuery(SQL`DROP TABLE versions;`);
},
],
+ [
+ 31,
+ async () => {
+ await dbQuery(
+ SQL`
+ CREATE TABLE IF NOT EXISTS olm_notifications_sessions (
+ cookie_id bigint(20) NOT NULL,
+ pickled_olm_session text CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL
+ ) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;
+
+ ALTER TABLE olm_notifications_sessions
+ ADD PRIMARY KEY (cookie_id);
+ `,
+ { multipleStatements: true },
+ );
+ },
+ ],
]);
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
@@ -249,6 +249,11 @@
processed_content mediumtext COLLATE utf8mb4_bin
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
+ CREATE TABLE olm_notifications_sessions (
+ cookie_id bigint(20) NOT NULL,
+ pickled_olm_session text CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL
+ ) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;
+
ALTER TABLE cookies
ADD PRIMARY KEY (id),
ADD UNIQUE KEY device_token (device_token(512)),
@@ -368,6 +373,9 @@
ALTER TABLE message_search
ADD PRIMARY KEY (original_message_id),
ADD FULLTEXT INDEX processed_content (processed_content);
+
+ ALTER TABLE olm_notifications_sessions
+ ADD PRIMARY KEY (cookie_id);
`,
{ multipleStatements: true },
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 10:16 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2590141
Default Alt Text
D7463.id25214.diff (1 KB)
Attached To
Mode
D7463: Add table to store olm notifications sessions
Attached
Detach File
Event Timeline
Log In to Comment