Page MenuHomePhorge

D7076.1765284907.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D7076.1765284907.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
@@ -275,6 +275,25 @@
);
},
],
+ [
+ 23,
+ async () => {
+ await dbQuery(
+ SQL`
+ CREATE TABLE IF NOT EXISTS message_search (
+ original_message_id bigint(20) NOT NULL,
+ message_id bigint(20) NOT NULL,
+ processed_content mediumtext COLLATE utf8mb4_bin
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
+
+ ALTER TABLE message_search
+ ADD PRIMARY KEY (original_message_id),
+ ADD FULLTEXT INDEX processed_content (processed_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
@@ -248,6 +248,12 @@
creation_time bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ CREATE TABLE message_search (
+ original_message_id bigint(20) NOT NULL,
+ message_id bigint(20) NOT NULL,
+ processed_content mediumtext COLLATE utf8mb4_bin
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
+
ALTER TABLE cookies
ADD PRIMARY KEY (id),
ADD UNIQUE KEY device_token (device_token(512)),
@@ -366,6 +372,10 @@
ALTER TABLE siwe_nonces
ADD PRIMARY KEY (nonce);
+
+ ALTER TABLE message_search
+ ADD PRIMARY KEY (original_message_id),
+ ADD FULLTEXT INDEX processed_content (processed_content);
`,
{ multipleStatements: true },
);

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 9, 12:55 PM (9 h, 16 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5854447
Default Alt Text
D7076.1765284907.diff (1 KB)

Event Timeline