CREATE TABLE "FishingCollectionEntry" (
    "userId" TEXT NOT NULL,
    "guildId" TEXT NOT NULL,
    "fishId" TEXT NOT NULL,
    "catchCount" INTEGER NOT NULL DEFAULT 0,
    "bestRarityId" TEXT NOT NULL,
    "bestRarityRank" INTEGER NOT NULL DEFAULT 0,
    "bestSizeCm" DOUBLE PRECISION NOT NULL DEFAULT 0,
    "lastCaughtAt" TIMESTAMP(3) NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "FishingCollectionEntry_pkey" PRIMARY KEY ("userId","guildId","fishId")
);

CREATE INDEX "FishingCollectionEntry_guildId_userId_idx" ON "FishingCollectionEntry"("guildId", "userId");
