Add missing index for aliases table

master
Sven Slootweg 1 year ago
parent 96e368b432
commit 8997a762ed

@ -0,0 +1,15 @@
"use strict";
module.exports.up = function(knex, Promise) {
return knex.schema
.alterTable("srap_aliases", (table) => {
table.index("item_id");
});
};
module.exports.down = function(knex, Promise) {
return knex.schema
.alterTable("srap_aliases", (table) => {
table.dropIndex("item_id");
});
};

@ -203,6 +203,7 @@ module.exports = function (state) {
storeItem: function (_options) {
// NOTE: Using `update` instead of `data` makes it an upsert!
// FIXME: Add an 'expire' flag for expiring any existing task results for this item? To trigger re-evaluation on updates
let [ options ] = validateArguments(arguments, {
options: [ required, {
id: [ required, isString ],

Loading…
Cancel
Save