CREATE TABLE `global_items` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `brand` text NOT NULL, `model` text NOT NULL, `category` text, `weight_grams` real, `price_cents` integer, `image_url` text, `description` text, `created_at` integer NOT NULL ); --> statement-breakpoint CREATE TABLE `item_global_links` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `item_id` integer NOT NULL, `global_item_id` integer NOT NULL, FOREIGN KEY (`item_id`) REFERENCES `items`(`id`) ON UPDATE no action ON DELETE cascade, FOREIGN KEY (`global_item_id`) REFERENCES `global_items`(`id`) ON UPDATE no action ON DELETE cascade ); --> statement-breakpoint CREATE UNIQUE INDEX `item_global_links_item_id_unique` ON `item_global_links` (`item_id`);