Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3389675
D4673.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
D4673.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
@@ -2,6 +2,7 @@
import fs from 'fs';
+import { dbQuery, SQL } from '../database/database';
import { updateRolesAndPermissionsForAllThreads } from '../updaters/thread-permission-updaters';
const migrations: $ReadOnlyMap<number, () => Promise<void>> = new Map([
@@ -29,6 +30,12 @@
],
[3, updateRolesAndPermissionsForAllThreads],
+ [
+ 4,
+ async () => {
+ await dbQuery(SQL`ALTER TABLE uploads ADD INDEX container (container)`);
+ },
+ ],
]);
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
@@ -304,7 +304,8 @@
ADD INDEX user_key_time (user, \`key\`, time);
ALTER TABLE uploads
- ADD PRIMARY KEY (id);
+ ADD PRIMARY KEY (id),
+ ADD INDEX container (container);
ALTER TABLE users
ADD PRIMARY KEY (id),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 8:08 PM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2602236
Default Alt Text
D4673.diff (1 KB)
Attached To
Mode
D4673: [keyserver] Add index to container column of uploads table
Attached
Detach File
Event Timeline
Log In to Comment