/*
  Warnings:

  - Added the required column `match_ends_at` to the `Matches` table without a default value. This is not possible if the table is not empty.
  - Added the required column `match_starts_at` to the `Matches` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "Matches" ADD COLUMN     "match_ends_at" TIMESTAMP(3) NOT NULL,
ADD COLUMN     "match_starts_at" TIMESTAMP(3) NOT NULL;

-- CreateTable
CREATE TABLE "Points" (
    "points_id" INTEGER NOT NULL,
    "team_id" INTEGER NOT NULL,
    "tournament_id" INTEGER NOT NULL,
    "points" INTEGER NOT NULL,

    CONSTRAINT "Points_pkey" PRIMARY KEY ("points_id")
);

-- AddForeignKey
ALTER TABLE "Points" ADD CONSTRAINT "Points_tournament_id_fkey" FOREIGN KEY ("tournament_id") REFERENCES "Tournament"("tournament_id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Points" ADD CONSTRAINT "Points_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("team_id") ON DELETE RESTRICT ON UPDATE CASCADE;
