This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/server/migrations/20200926204620-add-missing-indexes.js
2020-09-26 14:01:04 -07:00

20 lines
661 B
JavaScript

'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"]);
}
};