CREATE TABLE `images` (`id` integer PRIMARY KEY AUTOINCREMENT,`public_id` text NOT NULL,`owner_id` integer NOT NULL,`page_id` integer,`created_at` datetime NOT NULL,`unreferenced_at` datetime,`stored_bytes` integer NOT NULL,`moved_from` integer,`object_key` text NOT NULL,`sealed_record` blob);
2
3
CREATE INDEX `img_page` ON `images`(`page_id`,`unreferenced_at`);
4
5
CREATE INDEX `img_owner` ON `images`(`owner_id`,`page_id`);
6
7
CREATE UNIQUE INDEX `idx_images_public_id` ON `images`(`public_id`);
8
9
CREATE TABLE `image_trash` (`object_key` text,`queued_at` datetime NOT NULL,PRIMARY KEY (`object_key`));