Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3395601
D7560.id26278.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
D7560.id26278.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
@@ -381,6 +381,29 @@
);
},
],
+ [
+ 34,
+ async () => {
+ await dbQuery(
+ SQL`
+ CREATE TABLE IF NOT EXISTS olm_accounts (
+ is_content tinyint(1) NOT NULL,
+ version bigint(20) NOT NULL,
+ pickling_key text
+ CHARACTER SET latin1
+ COLLATE latin1_bin NOT NULL,
+ pickled_olm_account text
+ CHARACTER SET latin1
+ COLLATE latin1_bin NOT NULL
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
+
+ ALTER TABLE olm_accounts
+ ADD PRIMARY KEY (is_content);
+ `,
+ { 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
@@ -269,6 +269,17 @@
COLLATE latin1_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
+ CREATE TABLE olm_accounts (
+ is_content tinyint(1) NOT NULL,
+ version bigint(20) NOT NULL,
+ pickling_key text
+ CHARACTER SET latin1
+ COLLATE latin1_bin NOT NULL,
+ pickled_olm_account text
+ CHARACTER SET latin1
+ COLLATE latin1_bin NOT NULL
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
+
ALTER TABLE cookies
ADD PRIMARY KEY (id),
ADD UNIQUE KEY device_token (device_token(512)),
@@ -396,6 +407,9 @@
ALTER TABLE olm_sessions
ADD PRIMARY KEY (cookie_id, is_content);
+
+ ALTER TABLE olm_accounts
+ ADD PRIMARY KEY (is_content);
`,
{ multipleStatements: true },
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 6:27 AM (7 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2606866
Default Alt Text
D7560.id26278.diff (1 KB)
Attached To
Mode
D7560: Add table for keyserver olm accounts
Attached
Detach File
Event Timeline
Log In to Comment