From 882863af10be09eeedfcf5f51677f1df505a5e1e Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 21 Mar 2021 00:39:23 +0100 Subject: [PATCH] Index item_id properly on task-results --- migrations/20210320222335_indexes.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 migrations/20210320222335_indexes.js diff --git a/migrations/20210320222335_indexes.js b/migrations/20210320222335_indexes.js new file mode 100644 index 0000000..8e98d59 --- /dev/null +++ b/migrations/20210320222335_indexes.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports.up = function(knex, Promise) { + return knex.schema + .alterTable("task_results", (table) => { + table.index("item_id"); + }); +}; + +module.exports.down = function(knex, Promise) { + return knex.schema + .alterTable("task_results", (table) => { + table.dropIndex("item_id"); + }); +};