v1.4 Collection Tools #9

Merged
makiolaj merged 17 commits from feature/v1.4-collection-tools into Develop 2026-04-03 18:05:24 +00:00
3 changed files with 3 additions and 0 deletions
Showing only changes of commit 923a0f66b0 - Show all commits

View File

@@ -0,0 +1 @@
ALTER TABLE `items` ADD `quantity` integer DEFAULT 1 NOT NULL;

View File

@@ -21,6 +21,7 @@ export const items = sqliteTable("items", {
productUrl: text("product_url"),
imageFilename: text("image_filename"),
imageSourceUrl: text("image_source_url"),
quantity: integer("quantity").notNull().default(1),
createdAt: integer("created_at", { mode: "timestamp" })
.notNull()
.$defaultFn(() => new Date()),

View File

@@ -9,6 +9,7 @@ export const createItemSchema = z.object({
productUrl: z.string().url().optional().or(z.literal("")),
imageFilename: z.string().optional(),
imageSourceUrl: z.string().url().optional().or(z.literal("")),
quantity: z.number().int().positive().optional(),
});
export const updateItemSchema = createItemSchema.partial().extend({