text: -- CreateTable
  CREATE TABLE "Property" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "entity" TEXT NOT NULL,
      "type" TEXT NOT NULL DEFAULT E'string',
      "value" TEXT,
  
      CONSTRAINT "Property_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Message" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "language" TEXT NOT NULL,
      "entity" TEXT NOT NULL,
      "value" TEXT NOT NULL,
  
      CONSTRAINT "Message_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "User" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "name" TEXT NOT NULL DEFAULT E'',
      "username" TEXT NOT NULL DEFAULT E'',
      "verifiedAt" TIMESTAMP(3),
      "email" TEXT DEFAULT E'',
      "hashedPassword" TEXT DEFAULT E'',
      "salt" TEXT DEFAULT E'',
      "resetToken" TEXT,
      "resetTokenExpiresAt" TIMESTAMP(3),
  
      CONSTRAINT "User_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Preference" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "entity" TEXT NOT NULL,
      "value" TEXT,
      "userId" INTEGER NOT NULL,
  
      CONSTRAINT "Preference_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Group" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "name" TEXT NOT NULL,
      "description" TEXT NOT NULL,
  
      CONSTRAINT "Group_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "GroupMember" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "userId" INTEGER NOT NULL,
      "groupId" INTEGER NOT NULL,
  
      CONSTRAINT "GroupMember_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "GroupRole" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "role" TEXT NOT NULL,
      "groupId" INTEGER NOT NULL,
  
      CONSTRAINT "GroupRole_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Log" (
      "id" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "context" JSONB NOT NULL,
      "message" TEXT NOT NULL,
      "source" TEXT NOT NULL,
  
      CONSTRAINT "Log_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Property_entity_key" ON "Property"("entity");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Message_entity_language_key" ON "Message"("entity", "language");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "User_username_key" ON "User"("username");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Preference_entity_userId_key" ON "Preference"("entity", "userId");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Group_name_key" ON "Group"("name");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "GroupMember_userId_groupId_key" ON "GroupMember"("userId", "groupId");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "GroupRole_groupId_role_key" ON "GroupRole"("groupId", "role");
  
  -- AddForeignKey
  ALTER TABLE "Preference" ADD CONSTRAINT "Preference_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "GroupMember" ADD CONSTRAINT "GroupMember_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "GroupMember" ADD CONSTRAINT "GroupMember_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "GroupRole" ADD CONSTRAINT "GroupRole_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "Group"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  