From ad8f675f5e2a7439274c749f4e8f833e1660b21f Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 10 Sep 2026 01:25:20 -0400 Subject: [PATCH] fix: register inventory export jobs schema --- .../api/src/infrastructure/database/schema.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/apps/api/src/infrastructure/database/schema.js b/apps/api/src/infrastructure/database/schema.js index 25136b7..d496ce5 100644 --- a/apps/api/src/infrastructure/database/schema.js +++ b/apps/api/src/infrastructure/database/schema.js @@ -69,6 +69,27 @@ export const sellerSettings = pgTable("seller_settings", { ...timestamps, }); +export const inventoryExportJobs = pgTable( + "inventory_export_jobs", + { + id: uuid("id").defaultRandom().primaryKey(), + sellerId: uuid("seller_id") + .notNull() + .references(() => sellers.id, { onDelete: "cascade" }), + format: text("format").notNull(), + status: text("status").default("PENDING").notNull(), + output: jsonb("output"), + error: text("error"), + ...timestamps, + }, + (table) => [ + index("inventory_export_jobs_status_created_at_index").on( + table.status, + table.createdAt, + ), + ], +); + export const sessions = pgTable( "sessions", {