-- A paused API must not acknowledge an object that GC has already retired. CREATE TABLE upload_reservations ( id uuid PRIMARY KEY, object_key text NOT NULL UNIQUE, state text NOT NULL DEFAULT 'uploading' CHECK (state IN ('uploading','accepted','abandoned')), expires_at timestamptz NOT NULL DEFAULT clock_timestamp()+interval '120 seconds', created_at timestamptz NOT NULL DEFAULT clock_timestamp() );