feat(29-01): add dominantColor and crop fields to schema

Add dominant_color, crop_zoom, crop_x, crop_y columns to items,
global_items, and thread_candidates tables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 19:55:47 +02:00
parent cee15002ae
commit 36363a8ca3

View File

@@ -58,6 +58,10 @@ export const items = pgTable("items", {
globalItemId: integer("global_item_id").references(() => globalItems.id),
purchasePriceCents: integer("purchase_price_cents"),
brand: text("brand"),
dominantColor: text("dominant_color"),
cropZoom: doublePrecision("crop_zoom"),
cropX: doublePrecision("crop_x"),
cropY: doublePrecision("crop_y"),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull(),
});
@@ -96,6 +100,10 @@ export const threadCandidates = pgTable("thread_candidates", {
productUrl: text("product_url"),
imageFilename: text("image_filename"),
imageSourceUrl: text("image_source_url"),
dominantColor: text("dominant_color"),
cropZoom: doublePrecision("crop_zoom"),
cropX: doublePrecision("crop_x"),
cropY: doublePrecision("crop_y"),
status: text("status").notNull().default("researching"),
pros: text("pros"),
cons: text("cons"),
@@ -147,6 +155,10 @@ export const globalItems = pgTable(
sourceUrl: text("source_url"),
imageCredit: text("image_credit"),
imageSourceUrl: text("image_source_url"),
dominantColor: text("dominant_color"),
cropZoom: doublePrecision("crop_zoom"),
cropX: doublePrecision("crop_x"),
cropY: doublePrecision("crop_y"),
createdAt: timestamp("created_at").defaultNow().notNull(),
},
(table) => [unique().on(table.brand, table.model)],