chore(migrations): Add missing indexes
This commit is contained in:
19
server/migrations/20200926204620-add-missing-indexes.js
Normal file
19
server/migrations/20200926204620-add-missing-indexes.js
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addIndex("search_queries", ["teamId"]);
|
||||
await queryInterface.addIndex("search_queries", ["userId"]);
|
||||
await queryInterface.addIndex("search_queries", ["createdAt"]);
|
||||
|
||||
await queryInterface.addIndex("users", ["teamId"]);
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeIndex("search_queries", ["teamId"]);
|
||||
await queryInterface.removeIndex("search_queries", ["userId"]);
|
||||
await queryInterface.removeIndex("search_queries", ["createdAt"]);
|
||||
|
||||
await queryInterface.removeIndex("users", ["teamId"]);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user