switch the order of the reprocessing statements in migrations

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-01-26 12:32:52 +01:00
parent 293100cf6d
commit fc73f6aae5
3 changed files with 7 additions and 2 deletions
@@ -21,11 +21,11 @@
*/
exports.up = async function up(knex) {
// Make sure to reprocess everything, to make sure that relations have a targetRef produced
await knex('final_entities').update({ hash: '' });
await knex('refresh_state').update({
result_hash: '',
next_update_at: knex.fn.now(),
});
await knex('final_entities').update({ hash: '' });
};
exports.down = async function down() {};
@@ -34,11 +34,11 @@ exports.up = async function up(knex) {
// not enough to just reset the final_entities hash, since stitching is driven
// only by processing resulting in data that isn't matching the refresh_state
// hash.
await knex('final_entities').update({ hash: '' });
await knex('refresh_state').update({
result_hash: '',
next_update_at: knex.fn.now(),
});
await knex('final_entities').update({ hash: '' });
};
/**