perf: Add createdAt index to events table
This commit is contained in:
13
server/migrations/20220319022812-events-indexes.js
Normal file
13
server/migrations/20220319022812-events-indexes.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addIndex("events", ["createdAt"], {
|
||||
name: "events_created_at",
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeIndex("events", "events_created_at");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user