CREATE TABLE `banners` (
	`id` int unsigned AUTO_INCREMENT NOT NULL,
	`title` varchar(255) NOT NULL,
	`subtitle` varchar(255),
	`image_url` varchar(512) NOT NULL,
	`link_url` varchar(512),
	`link_label` varchar(120),
	`is_active` boolean NOT NULL DEFAULT true,
	`sort_order` int unsigned NOT NULL DEFAULT 0,
	`created_at` timestamp NOT NULL DEFAULT (now()),
	`updated_at` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
	CONSTRAINT `banners_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `order_items` ADD `lens_choice` varchar(30) DEFAULT 'none' NOT NULL;--> statement-breakpoint
ALTER TABLE `order_items` ADD `prescription_url` varchar(500);--> statement-breakpoint
CREATE INDEX `banners_active_sort_idx` ON `banners` (`is_active`,`sort_order`);