-- AlterTable
ALTER TABLE "Place" ADD COLUMN     "googleBusinessStatus" TEXT,
ADD COLUMN     "googleCurrentOpeningHours" JSONB,
ADD COLUMN     "googlePayload" JSONB,
ADD COLUMN     "googlePayloadFetchedAt" TIMESTAMP(3),
ADD COLUMN     "googlePhotos" JSONB,
ADD COLUMN     "googleRating" DOUBLE PRECISION,
ADD COLUMN     "googleRegularOpeningHours" JSONB,
ADD COLUMN     "googleUserRatingCount" INTEGER;

-- AlterTable
ALTER TABLE "VoiceExperience" ADD COLUMN     "promptHintsShown" TEXT[] DEFAULT ARRAY[]::TEXT[],
ADD COLUMN     "recordingPayload" JSONB;

-- CreateTable
CREATE TABLE "UserFavoritePlace" (
    "id" TEXT NOT NULL,
    "userId" TEXT NOT NULL,
    "placeId" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT "UserFavoritePlace_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "UserFavoritePlace_userId_placeId_key" ON "UserFavoritePlace"("userId", "placeId");

-- AddForeignKey
ALTER TABLE "UserFavoritePlace" ADD CONSTRAINT "UserFavoritePlace_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "UserFavoritePlace" ADD CONSTRAINT "UserFavoritePlace_placeId_fkey" FOREIGN KEY ("placeId") REFERENCES "Place"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

