mirror of
https://github.com/outline/outline.git
synced 2026-04-24 02:59:21 -05:00
perf: Add missing indexes to views table
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addIndex("views", ["userId"], {
|
||||
name: "views_user_id",
|
||||
});
|
||||
await queryInterface.addIndex("views", ["updatedAt"], {
|
||||
name: "views_updated_at",
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeIndex("views", "views_updated_at");
|
||||
await queryInterface.removeIndex("views", "views_user_id");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user