text: /*
    Warnings:
  
    - You are about to drop the column `subscriptionId` on the `Transaction` table. All the data in the column will be lost.
    - Added the required column `authorId` to the `Subscription` table without a default value. This is not possible if the table is not empty.
    - Added the required column `authorId` to the `Transaction` table without a default value. This is not possible if the table is not empty.
    - Added the required column `courseId` to the `Transaction` table without a default value. This is not possible if the table is not empty.
  
  */
  -- RedefineTables
  PRAGMA foreign_keys=OFF;
  CREATE TABLE "new_Subscription" (
      "id" TEXT NOT NULL PRIMARY KEY,
      "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" DATETIME NOT NULL,
      "userId" TEXT NOT NULL,
      "authorId" TEXT NOT NULL,
      "courseId" TEXT NOT NULL,
      "status" TEXT NOT NULL,
      CONSTRAINT "Subscription_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT "Subscription_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT "Subscription_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
  );
  INSERT INTO "new_Subscription" ("courseId", "createdAt", "id", "status", "updatedAt", "userId") SELECT "courseId", "createdAt", "id", "status", "updatedAt", "userId" FROM "Subscription";
  DROP TABLE "Subscription";
  ALTER TABLE "new_Subscription" RENAME TO "Subscription";
  CREATE TABLE "new_Transaction" (
      "id" TEXT NOT NULL PRIMARY KEY,
      "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" DATETIME NOT NULL,
      "userId" TEXT NOT NULL,
      "courseId" TEXT NOT NULL,
      "authorId" TEXT NOT NULL,
      "bankName" TEXT NOT NULL,
      "bankAccountNumber" TEXT NOT NULL,
      "bankAccountName" TEXT NOT NULL,
      "amount" INTEGER NOT NULL,
      "status" TEXT NOT NULL,
      CONSTRAINT "Transaction_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT "Transaction_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
      CONSTRAINT "Transaction_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course" ("id") ON DELETE CASCADE ON UPDATE CASCADE
  );
  INSERT INTO "new_Transaction" ("amount", "bankAccountName", "bankAccountNumber", "bankName", "createdAt", "id", "status", "updatedAt", "userId") SELECT "amount", "bankAccountName", "bankAccountNumber", "bankName", "createdAt", "id", "status", "updatedAt", "userId" FROM "Transaction";
  DROP TABLE "Transaction";
  ALTER TABLE "new_Transaction" RENAME TO "Transaction";
  PRAGMA foreign_key_check;
  PRAGMA foreign_keys=ON;
  