ALTER TABLE "reviews"
ADD COLUMN "category" TEXT,
ADD COLUMN "customerUserId" TEXT;

CREATE INDEX "reviews_shopId_category_createdAt_idx"
ON "reviews"("shopId", "category", "createdAt");

CREATE INDEX "reviews_customerUserId_createdAt_idx"
ON "reviews"("customerUserId", "createdAt");

ALTER TABLE "reviews"
ADD CONSTRAINT "reviews_customerUserId_fkey"
FOREIGN KEY ("customerUserId") REFERENCES "users"("id")
ON DELETE SET NULL ON UPDATE CASCADE;
