CREATE TABLE "pricing_refresh_jobs" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "seller_id" uuid NOT NULL REFERENCES "sellers"("id"), "inventory_item_id" uuid NOT NULL REFERENCES "inventory_items"("id"), "product_id" uuid NOT NULL REFERENCES "products"("id"), "condition_id" uuid NOT NULL REFERENCES "conditions"("id"), "provider_id" text NOT NULL, "status" text DEFAULT 'PENDING' NOT NULL, "observations" jsonb DEFAULT '[]'::jsonb NOT NULL, "valuation" jsonb, "error" text, "created_at" timestamp with time zone DEFAULT now() NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE INDEX "pricing_refresh_jobs_status_created_at_index" ON "pricing_refresh_jobs" USING btree ("status", "created_at");