Files
pokemon-inventory/database/migrations/0008_inventory_images.sql
T
fragginwagon c728016dec feat: establish auth listing and image vertical slices
Includes MFA-capable authentication, session and CSRF security, password recovery, listing lifecycle and ownership rules, inventory image metadata, local ImageStorage, migrations, tests, and implementation status documentation. Verification: npm test (62 passing) and integration suite (14 passing).
2026-09-08 17:32:03 -04:00

18 lines
747 B
SQL

CREATE TABLE "inventory_images" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"inventory_item_id" uuid NOT NULL REFERENCES "inventory_items"("id"),
"storage_key" text NOT NULL,
"original_filename" text NOT NULL,
"mime_type" text NOT NULL,
"file_size" integer NOT NULL,
"width" integer NOT NULL,
"height" integer NOT NULL,
"alt_text" text,
"sort_order" integer DEFAULT 0 NOT NULL,
"is_primary" boolean DEFAULT false NOT NULL,
"processing_status" text DEFAULT 'PENDING' NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
CREATE INDEX "inventory_images_inventory_item_id_index" ON "inventory_images" ("inventory_item_id");