mirror of
https://github.com/outline/outline.git
synced 2026-11-23 06:11:04 +03:00
perf: Add userId index to oauth_authentications (#14444)
This commit is contained in:
1 parent
806b85e01e
commit
ffdd4f9496
1 file changed
+17
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
/** @type {import('sequelize-cli').Migration} */
|
||||
module.exports = {
|
||||
async up(queryInterface) {
|
||||
// Covers listing a user's authentications and cascade deletes of users.
|
||||
await queryInterface.sequelize.query(
|
||||
'CREATE INDEX CONCURRENTLY IF NOT EXISTS "oauth_authentications_user_id" ON "oauth_authentications" ("userId");'
|
||||
);
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.sequelize.query(
|
||||
'DROP INDEX CONCURRENTLY IF EXISTS "oauth_authentications_user_id";'
|
||||
);
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user