switch the order of the reprocessing statements in migrations
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Switched the order of reprocessing statements retroactively in migrations. This only improves the experience for those who at a later time perform a large upgrade of an old Backstage installation.
|
||||
@@ -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() {};
|
||||
|
||||
+1
-1
@@ -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: '' });
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user