-- CreateTable
CREATE TABLE "GoogleReviewsMeta" (
    "id" TEXT NOT NULL PRIMARY KEY DEFAULT 'default',
    "placeId" TEXT NOT NULL,
    "rating" REAL,
    "reviewCount" INTEGER,
    "googleMapsUri" TEXT NOT NULL,
    "syncedAt" DATETIME NOT NULL
);

-- CreateTable
CREATE TABLE "GoogleReview" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "authorName" TEXT NOT NULL,
    "authorUri" TEXT,
    "authorPhotoUri" TEXT,
    "rating" REAL NOT NULL,
    "text" TEXT NOT NULL,
    "relativeTime" TEXT NOT NULL DEFAULT '',
    "googleMapsUri" TEXT,
    "sortOrder" INTEGER NOT NULL DEFAULT 0,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
