From 0701fd74bc71375c92ae900b93f5baec5bf99c62 Mon Sep 17 00:00:00 2001 From: yamashush <38120991+yamashush@users.noreply.github.com> Date: Sun, 14 Jan 2024 21:38:21 +0900 Subject: [PATCH] Add index at revision table Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com> --- lib/migrations/20240114120250-revision-add-index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/migrations/20240114120250-revision-add-index.js diff --git a/lib/migrations/20240114120250-revision-add-index.js b/lib/migrations/20240114120250-revision-add-index.js new file mode 100644 index 0000000000..01d94f56ad --- /dev/null +++ b/lib/migrations/20240114120250-revision-add-index.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.addIndex('Revisions', ['noteId'], {}) + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.removeIndex('Revisions', 'noteId') + } +};