/*
  Warnings:

  - You are about to drop the column `notes` on the `match_results` table. All the data in the column will be lost.
  - You are about to drop the column `submittedAt` on the `match_results` table. All the data in the column will be lost.
  - You are about to drop the column `submittedById` on the `match_results` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "match_results" DROP CONSTRAINT "match_results_submittedById_fkey";

-- AlterTable
ALTER TABLE "match_results" DROP COLUMN "notes",
DROP COLUMN "submittedAt",
DROP COLUMN "submittedById",
ADD COLUMN     "awayGmNotes" TEXT,
ADD COLUMN     "awayScoreByAway" INTEGER,
ADD COLUMN     "awayScoreByHome" INTEGER,
ADD COLUMN     "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN     "homeGmNotes" TEXT,
ADD COLUMN     "homeScoreByAway" INTEGER,
ADD COLUMN     "homeScoreByHome" INTEGER,
ADD COLUMN     "submittedByAwayAt" TIMESTAMP(3),
ADD COLUMN     "submittedByAwayGmId" TEXT,
ADD COLUMN     "submittedByHomeAt" TIMESTAMP(3),
ADD COLUMN     "submittedByHomeGmId" TEXT,
ADD COLUMN     "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

-- AddForeignKey
ALTER TABLE "match_results" ADD CONSTRAINT "match_results_submittedByHomeGmId_fkey" FOREIGN KEY ("submittedByHomeGmId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "match_results" ADD CONSTRAINT "match_results_submittedByAwayGmId_fkey" FOREIGN KEY ("submittedByAwayGmId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
