Skip to content

Commit

Permalink
refactor: make indx composite of user_id and tag
Browse files Browse the repository at this point in the history
  • Loading branch information
KishenKumarrrrr committed Aug 12, 2024
1 parent 684052d commit ed2a37b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addIndex('email_messages_transactional', {
name: 'email_messages_transactional_user_id_idx',
fields: ['user_id']
name: 'email_messages_transactional_user_id_tag_idx',
fields: ['user_id', 'tag']
})
},

down: async (queryInterface, Sequelize) => {
await queryInterface.removeIndex('email_messages_transactional', 'email_messages_transactional_user_id_idx')
await queryInterface.removeIndex('email_messages_transactional', 'email_messages_transactional_user_id_tag_idx')
}
};

0 comments on commit ed2a37b

Please sign in to comment.