Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33299972
D8732.1768769605.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
621 B
Referenced Files
None
Subscribers
None
D8732.1768769605.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
@@ -499,6 +499,21 @@
`);
},
],
+ [
+ 43,
+ () =>
+ dbQuery(
+ SQL`
+ UPDATE threads
+ SET pinned_count = (
+ SELECT COUNT(*)
+ FROM messages
+ WHERE messages.thread = threads.id
+ AND messages.pinned = 1
+ )
+ `,
+ ),
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 8:53 PM (2 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5953050
Default Alt Text
D8732.1768769605.diff (621 B)
Attached To
Mode
D8732: [keyserver] Run migration to update thread pinned_counts
Attached
Detach File
Event Timeline
Log In to Comment