-- DropForeignKey
ALTER TABLE "Fouls" DROP CONSTRAINT "Fouls_foul_player_id_fkey";

-- DropForeignKey
ALTER TABLE "Goals" DROP CONSTRAINT "Goals_goal_player_id_fkey";

-- DropForeignKey
ALTER TABLE "invites" DROP CONSTRAINT "invites_user_id_fkey";

-- DropForeignKey
ALTER TABLE "refresh_token" DROP CONSTRAINT "refresh_token_userId_fkey";

-- DropForeignKey
ALTER TABLE "teams" DROP CONSTRAINT "teams_owner_id_fkey";

-- AlterTable
ALTER TABLE "Tournament" ALTER COLUMN "tournament_draw_points" SET DEFAULT 1,
ALTER COLUMN "tournament_victory_points" SET DEFAULT 3;

-- AddForeignKey
ALTER TABLE "teams" ADD CONSTRAINT "teams_owner_id_fkey" FOREIGN KEY ("owner_id") REFERENCES "users"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "invites" ADD CONSTRAINT "invites_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "refresh_token" ADD CONSTRAINT "refresh_token_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Goals" ADD CONSTRAINT "Goals_goal_player_id_fkey" FOREIGN KEY ("goal_player_id") REFERENCES "users"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Fouls" ADD CONSTRAINT "Fouls_foul_player_id_fkey" FOREIGN KEY ("foul_player_id") REFERENCES "users"("user_id") ON DELETE CASCADE ON UPDATE CASCADE;
