export const products = sqliteTable(
"products_table",
{
id: int().primaryKey(),
name: text().notNull(),
type: text(),
sku: text(),
externalId: text("external_id").notNull().unique(),
price: text(),
regularPrice: text("regular_price"),
salePrice: text("sale_price"),
manageStock: int("manage_stock", { mode: "boolean" }),
stockQuantity: int("stock_quantity"),
},
(table) => {
return {
nameIdx: index("sku_idx").on(table.sku),
};
}
);
export const products = sqliteTable(
"products_table",
{
id: int().primaryKey(),
name: text().notNull(),
type: text(),
sku: text(),
externalId: text("external_id").notNull().unique(),
price: text(),
regularPrice: text("regular_price"),
salePrice: text("sale_price"),
manageStock: int("manage_stock", { mode: "boolean" }),
stockQuantity: int("stock_quantity"),
},
(table) => {
return {
nameIdx: index("sku_idx").on(table.sku),
};
}
);