From 96e368b4328c34cb9fb38fa41b18478855e9401d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 26 Nov 2022 22:58:27 +0100 Subject: [PATCH] Add missing index on tags table --- migrations/20221126223051_index-tags.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 migrations/20221126223051_index-tags.js diff --git a/migrations/20221126223051_index-tags.js b/migrations/20221126223051_index-tags.js new file mode 100644 index 0000000..84966a0 --- /dev/null +++ b/migrations/20221126223051_index-tags.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports.up = function(knex, Promise) { + return knex.schema + .alterTable("srap_tags", (table) => { + table.index("item_id"); + }); +}; + +module.exports.down = function(knex, Promise) { + return knex.schema + .alterTable("srap_tags", (table) => { + table.dropIndex("item_id"); + }); +};