-- CreateEnum
CREATE TYPE "Biome" AS ENUM ('PLAINS', 'FIELDS', 'WOODLAND', 'FOREST', 'SWAMP', 'TUNDRA', 'MOUNTAIN', 'CAVE', 'DESERT');

-- CreateTable
CREATE TABLE "Zone" (
    "id" UUID NOT NULL,
    "start_x" INTEGER NOT NULL,
    "start_y" INTEGER NOT NULL,

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

-- CreateTable
CREATE TABLE "ZoneBiomes" (
    "zoneId" UUID NOT NULL,
    "biome" "Biome" NOT NULL,
    "start_x" INTEGER NOT NULL,
    "start_y" INTEGER NOT NULL,
    "end_x" INTEGER NOT NULL,
    "end_y" INTEGER NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "ZoneBiomes_zoneId_key" ON "ZoneBiomes"("zoneId");

-- AddForeignKey
ALTER TABLE "ZoneBiomes" ADD CONSTRAINT "ZoneBiomes_zoneId_fkey" FOREIGN KEY ("zoneId") REFERENCES "Zone"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
