feat: persist image derivative jobs
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-08 22:00:18 -04:00
parent b00bd388a9
commit 7be79f4840
8 changed files with 1773 additions and 1 deletions
@@ -264,6 +264,22 @@ export const inventoryImages = pgTable(
(table) => [index('inventory_images_inventory_item_id_index').on(table.inventoryItemId)],
);
export const imageDerivativeJobs = pgTable(
'image_derivative_jobs',
{
id: uuid('id').defaultRandom().primaryKey(),
inventoryImageId: uuid('inventory_image_id')
.notNull()
.references(() => inventoryImages.id),
sourceKey: text('source_key').notNull(),
status: text('status').default('PENDING').notNull(),
derivatives: jsonb('derivatives').default([]).notNull(),
error: text('error'),
...timestamps,
},
(table) => [index('image_derivative_jobs_image_id_index').on(table.inventoryImageId)],
);
export const listings = pgTable('listings', {
id: uuid('id').defaultRandom().primaryKey(),
inventoryItemId: uuid('inventory_item_id')