-- Migration 108: Create gear_images table (v0.501 G1.2) CREATE TABLE IF NOT EXISTS gear_images ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), gear_id UUID NOT NULL REFERENCES gear_items(id) ON DELETE CASCADE, image_url VARCHAR(500) NOT NULL, position INT NOT NULL DEFAULT 0, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() ); CREATE INDEX idx_gear_images_gear_id ON gear_images(gear_id);