text: /*
    Warnings:
  
    - Added the required column `attemptId` to the `Results` table without a default value. This is not possible if the table is not empty.
  
  */
  -- AlterTable
  ALTER TABLE "Results" ADD COLUMN     "attemptId" INTEGER;
  
  -- CreateTable
  CREATE TABLE "Attempt" (
      "id" SERIAL NOT NULL,
      "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "user_id" INTEGER NOT NULL,
      "questions" INTEGER[],
      "result_id" INTEGER NOT NULL,
      "step" INTEGER NOT NULL,
  
      CONSTRAINT "Attempt_pkey" PRIMARY KEY ("id")
  );
  
  -- AddForeignKey
  ALTER TABLE "Results" ADD CONSTRAINT "Results_attemptId_fkey" FOREIGN KEY ("attemptId") REFERENCES "Attempt"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Attempt" ADD CONSTRAINT "Attempt_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  