CREATE TABLE `product_images` (
	`id` text PRIMARY KEY NOT NULL,
	`sm` blob NOT NULL,
	`md` blob NOT NULL,
	`created_at` text NOT NULL
);
--> statement-breakpoint
CREATE TABLE `stock_alerts` (
	`user_id` integer NOT NULL,
	`product_id` text NOT NULL,
	`created_at` text NOT NULL,
	`notified_at` text,
	PRIMARY KEY(`user_id`, `product_id`)
);
--> statement-breakpoint
CREATE INDEX `stock_alerts_product_idx` ON `stock_alerts` (`product_id`,`notified_at`);--> statement-breakpoint
ALTER TABLE `otp_codes` ADD `purpose` text DEFAULT 'register' NOT NULL;--> statement-breakpoint
ALTER TABLE `users` ADD `password_hash` text;--> statement-breakpoint
ALTER TABLE `users` ADD `admin_note` text DEFAULT '' NOT NULL;