CREATE TABLE `note_photos` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `server_id` integer, `device_id` integer, `content_type` text NOT NULL, `data` blob NOT NULL, `size` integer NOT NULL, `caption` text, `created_by` text, `created_at` text NOT NULL, FOREIGN KEY (`server_id`) REFERENCES `servers`(`id`) ON UPDATE no action ON DELETE cascade, FOREIGN KEY (`device_id`) REFERENCES `network_devices`(`id`) ON UPDATE no action ON DELETE cascade ); --> statement-breakpoint CREATE INDEX `note_photos_server_idx` ON `note_photos` (`server_id`);--> statement-breakpoint CREATE INDEX `note_photos_device_idx` ON `note_photos` (`device_id`);