text: /*
    Warnings:
  
    - Added the required column `creatorAddress` to the `Post` table without a default value. This is not possible if the table is not empty.
    - Added the required column `expiration` to the `Post` table without a default value. This is not possible if the table is not empty.
    - Added the required column `title` to the `Post` table without a default value. This is not possible if the table is not empty.
  
  */
  -- CreateTable
  CREATE TABLE "User" (
      "address" TEXT NOT NULL PRIMARY KEY,
      "name" TEXT NOT NULL
  );
  
  -- CreateTable
  CREATE TABLE "Token" (
      "address" TEXT NOT NULL PRIMARY KEY,
      "name" TEXT
  );
  
  -- CreateTable
  CREATE TABLE "Comment" (
      "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
      "content" TEXT NOT NULL,
      "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "creatorAddress" TEXT NOT NULL,
      "commentId" INTEGER,
      FOREIGN KEY ("creatorAddress") REFERENCES "User" ("address") ON DELETE CASCADE ON UPDATE CASCADE,
      FOREIGN KEY ("commentId") REFERENCES "Comment" ("id") ON DELETE SET NULL ON UPDATE CASCADE
  );
  
  -- CreateTable
  CREATE TABLE "_PostToToken" (
      "A" INTEGER NOT NULL,
      "B" TEXT NOT NULL,
      FOREIGN KEY ("A") REFERENCES "Post" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
      FOREIGN KEY ("B") REFERENCES "Token" ("address") ON DELETE CASCADE ON UPDATE CASCADE
  );
  
  -- RedefineTables
  PRAGMA foreign_keys=OFF;
  CREATE TABLE "new_Post" (
      "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
      "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "title" TEXT NOT NULL,
      "expiration" DATETIME NOT NULL,
      "creatorAddress" TEXT NOT NULL,
      FOREIGN KEY ("creatorAddress") REFERENCES "User" ("address") ON DELETE CASCADE ON UPDATE CASCADE
  );
  INSERT INTO "new_Post" ("createdAt", "id") SELECT "createdAt", "id" FROM "Post";
  DROP TABLE "Post";
  ALTER TABLE "new_Post" RENAME TO "Post";
  PRAGMA foreign_key_check;
  PRAGMA foreign_keys=ON;
  
  -- CreateIndex
  CREATE UNIQUE INDEX "User.name_unique" ON "User"("name");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "_PostToToken_AB_unique" ON "_PostToToken"("A", "B");
  
  -- CreateIndex
  CREATE INDEX "_PostToToken_B_index" ON "_PostToToken"("B");
  