Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372553
D7517.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
D7517.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
@@ -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
Details
Attached
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)
Attached To
Mode
D7517: [keyserver] Add migration to populate `target_message` for sidebar_source
Attached
Detach File
Event Timeline
Log In to Comment