2016-06-26 06:40:08 +00:00
|
|
|
module.exports = {
|
2017-11-20 00:49:51 +00:00
|
|
|
up: async (queryInterface, Sequelize) => {
|
|
|
|
await queryInterface.addIndex('documents', ['urlId']);
|
|
|
|
await queryInterface.addIndex('documents', ['id', 'atlasId']);
|
|
|
|
await queryInterface.addIndex('documents', ['id', 'teamId']);
|
|
|
|
await queryInterface.addIndex('documents', ['parentDocumentId', 'atlasId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.addIndex('atlases', ['id', 'teamId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.addIndex('teams', ['slackId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.addIndex('users', ['slackId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
},
|
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
|
|
await queryInterface.removeIndex('documents', ['urlId']);
|
|
|
|
await queryInterface.removeIndex('documents', ['id', 'atlasId']);
|
|
|
|
await queryInterface.removeIndex('documents', ['id', 'teamId']);
|
|
|
|
await queryInterface.removeIndex('documents', ['parentDocumentId', 'atlasId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.removeIndex('atlases', ['id', 'teamId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.removeIndex('teams', ['slackId']);
|
2016-06-26 06:40:08 +00:00
|
|
|
|
2017-11-20 00:49:51 +00:00
|
|
|
await queryInterface.removeIndex('users', ['slackId']);
|
2017-04-27 04:47:03 +00:00
|
|
|
},
|
2016-06-26 06:40:08 +00:00
|
|
|
};
|