-- AlterEnum
ALTER TYPE "public"."ZiodicSignEnum" ADD VALUE 'VIRGUE';

-- CreateTable
CREATE TABLE "public"."AstrologyCalculation" (
    "id" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,
    "date" TEXT NOT NULL,
    "time" TEXT NOT NULL,
    "timezone" TEXT NOT NULL,
    "latitude" DOUBLE PRECISION NOT NULL,
    "longitude" DOUBLE PRECISION NOT NULL,
    "utc" TEXT NOT NULL,
    "julianDayUT" DOUBLE PRECISION NOT NULL,
    "sunLongitude" DOUBLE PRECISION NOT NULL,
    "sunSign" "public"."ZiodicSignEnum" NOT NULL,
    "sunDegree" DOUBLE PRECISION NOT NULL,
    "sunFormatted" TEXT NOT NULL,
    "moonLongitude" DOUBLE PRECISION NOT NULL,
    "moonSign" "public"."ZiodicSignEnum" NOT NULL,
    "moonDegree" DOUBLE PRECISION NOT NULL,
    "moonFormatted" TEXT NOT NULL,
    "ascendantLongitude" DOUBLE PRECISION NOT NULL,
    "ascendantSign" "public"."ZiodicSignEnum" NOT NULL,
    "ascendantDegree" DOUBLE PRECISION NOT NULL,
    "ascendantFormatted" TEXT NOT NULL,
    "note" TEXT,
    "userId" TEXT NOT NULL,
    "isDeleted" BOOLEAN NOT NULL DEFAULT false,

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

-- CreateIndex
CREATE INDEX "AstrologyCalculation_userId_idx" ON "public"."AstrologyCalculation"("userId");

-- CreateIndex
CREATE INDEX "AstrologyCalculation_createdAt_idx" ON "public"."AstrologyCalculation"("createdAt");

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