From 5e55ad7131db3afd794e13d3519d617ed60f0338 Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 22 Dec 2023 15:45:20 -0300 Subject: [PATCH] agregar stock al schema --- scraper/db/schema.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scraper/db/schema.ts b/scraper/db/schema.ts index 10d7852..1f2f2b9 100644 --- a/scraper/db/schema.ts +++ b/scraper/db/schema.ts @@ -1,9 +1,10 @@ -import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; +import { integer, sqliteTable, text, b } from "drizzle-orm/sqlite-core"; export const precios = sqliteTable("precios", { id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }), - fetchedAt: integer("fetched_at", { mode: "timestamp" }).notNull(), - precioCentavos: integer("precio_centavos").notNull(), ean: text("ean").notNull(), + fetchedAt: integer("fetched_at", { mode: "timestamp" }).notNull(), + precioCentavos: integer("precio_centavos"), + inStock: integer("in_stock", { mode: "boolean" }), url: text("url"), });