Page MenuHomePhabricator

D7517.diff
No OneTemporary

D7517.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
@@ -3,6 +3,7 @@
import fs from 'fs';
import { policyTypes } from 'lib/facts/policies.js';
+import { messageTypes } from 'lib/types/message-types.js';
import { dbQuery, SQL } from '../database/database.js';
import { processMessagesInDBForSearch } from '../database/search-utils.js';
@@ -158,10 +159,10 @@
ADD INDEX IF NOT EXISTS thread (thread);
UPDATE uploads
- SET thread = (
- SELECT thread FROM messages
- WHERE messages.id = uploads.container
- );
+ SET thread = (
+ SELECT thread FROM messages
+ WHERE messages.id = uploads.container
+ );
`,
{ multipleStatements: true },
);
@@ -349,6 +350,16 @@
);
},
],
+ [
+ 32,
+ async () => {
+ await dbQuery(SQL`
+ UPDATE messages
+ SET target_message = JSON_VALUE(content, "$.sourceMessageID")
+ WHERE type = ${messageTypes.SIDEBAR_SOURCE};
+ `);
+ },
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 6:57 AM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2589277
Default Alt Text
D7517.diff (1 KB)

Event Timeline