From 253acc8b4395b2bdac6afdf651aba3b8c15bdc5f Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 1 Dec 2022 17:08:36 +0800 Subject: [PATCH] update last_updated_at when update final_entities Signed-off-by: iris --- plugins/catalog-backend/src/database/tables.ts | 1 + plugins/catalog-backend/src/stitching/Stitcher.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/catalog-backend/src/database/tables.ts b/plugins/catalog-backend/src/database/tables.ts index c23753b267..e3f3efd1bb 100644 --- a/plugins/catalog-backend/src/database/tables.ts +++ b/plugins/catalog-backend/src/database/tables.ts @@ -66,6 +66,7 @@ export type DbFinalEntitiesRow = { hash: string; stitch_ticket: string; final_entity?: string; + last_updated_at?: string | Date; }; export type DbSearchRow = { diff --git a/plugins/catalog-backend/src/stitching/Stitcher.ts b/plugins/catalog-backend/src/stitching/Stitcher.ts index 0da8e39694..64f5527262 100644 --- a/plugins/catalog-backend/src/stitching/Stitcher.ts +++ b/plugins/catalog-backend/src/stitching/Stitcher.ts @@ -207,6 +207,7 @@ export class Stitcher { .update({ final_entity: JSON.stringify(entity), hash, + last_updated_at: this.database.fn.now(), }) .where('entity_id', entityId) .where('stitch_ticket', ticket)