text: -- CreateEnum
  CREATE TYPE "Role" AS ENUM ('ADMIN', 'USER');
  
  -- CreateTable
  CREATE TABLE "User" (
      "id" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "email" TEXT NOT NULL,
      "password" TEXT NOT NULL,
      "firstname" TEXT,
      "lastname" TEXT,
      "role" "Role" NOT NULL,
  
      CONSTRAINT "User_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Hero" (
      "id" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "realName" TEXT NOT NULL,
      "alterEgo" TEXT NOT NULL,
      "image" TEXT NOT NULL,
      "published" BOOLEAN NOT NULL,
      "authorId" TEXT,
  
      CONSTRAINT "Hero_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "VotesOnHeroes" (
      "userId" TEXT NOT NULL,
      "heroId" TEXT NOT NULL,
      "assignedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "VotesOnHeroes_pkey" PRIMARY KEY ("userId","heroId")
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
  
  -- AddForeignKey
  ALTER TABLE "Hero" ADD CONSTRAINT "Hero_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "VotesOnHeroes" ADD CONSTRAINT "VotesOnHeroes_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "VotesOnHeroes" ADD CONSTRAINT "VotesOnHeroes_heroId_fkey" FOREIGN KEY ("heroId") REFERENCES "Hero"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  