-- AlterEnum
ALTER TYPE "public"."ActionTypes" ADD VALUE 'ASTROLOGY_CHART';

-- CreateTable
CREATE TABLE "public"."AstrologyCalculationResponse" (
    "id" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,
    "requestedDate" TEXT NOT NULL,
    "requestedTime" TEXT NOT NULL,
    "requestedTimezone" TEXT NOT NULL,
    "requestedLatitude" DOUBLE PRECISION NOT NULL,
    "requestedLongitude" DOUBLE PRECISION NOT NULL,
    "utc" TEXT NOT NULL,
    "julianDayUT" DOUBLE PRECISION NOT NULL,
    "sunLongitude" DOUBLE PRECISION NOT NULL,
    "sunSign" TEXT NOT NULL,
    "sunDegree" DOUBLE PRECISION NOT NULL,
    "sunFormatted" TEXT NOT NULL,
    "moonLongitude" DOUBLE PRECISION NOT NULL,
    "moonSign" TEXT NOT NULL,
    "moonDegree" DOUBLE PRECISION NOT NULL,
    "moonFormatted" TEXT NOT NULL,
    "ascendantLongitude" DOUBLE PRECISION NOT NULL,
    "ascendantSign" TEXT NOT NULL,
    "ascendantDegree" DOUBLE PRECISION NOT NULL,
    "ascendantFormatted" TEXT NOT NULL,
    "note" TEXT,
    "sunInfo" JSONB,
    "moonInfo" JSONB,
    "ascendantInfo" JSONB,
    "userId" TEXT NOT NULL,
    "isDeleted" BOOLEAN NOT NULL DEFAULT false,

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

-- CreateIndex
CREATE INDEX "AstrologyCalculationResponse_userId_idx" ON "public"."AstrologyCalculationResponse"("userId");

-- CreateIndex
CREATE INDEX "AstrologyCalculationResponse_createdAt_idx" ON "public"."AstrologyCalculationResponse"("createdAt");

-- CreateIndex
CREATE INDEX "AstrologyCalculationResponse_sunSign_idx" ON "public"."AstrologyCalculationResponse"("sunSign");

-- CreateIndex
CREATE INDEX "AstrologyCalculationResponse_moonSign_idx" ON "public"."AstrologyCalculationResponse"("moonSign");

-- CreateIndex
CREATE INDEX "AstrologyCalculationResponse_ascendantSign_idx" ON "public"."AstrologyCalculationResponse"("ascendantSign");

-- AddForeignKey
ALTER TABLE "public"."AstrologyCalculationResponse" ADD CONSTRAINT "AstrologyCalculationResponse_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
