/*
  Warnings:

  - You are about to drop the column `goal_player` on the `Goals` table. All the data in the column will be lost.
  - You are about to drop the column `goal_team` on the `Goals` table. All the data in the column will be lost.
  - Added the required column `goal_player_id` to the `Goals` table without a default value. This is not possible if the table is not empty.
  - Added the required column `goal_team_id` to the `Goals` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "Goals" DROP COLUMN "goal_player",
DROP COLUMN "goal_team",
ADD COLUMN     "goal_player_id" INTEGER NOT NULL,
ADD COLUMN     "goal_team_id" INTEGER NOT NULL;

-- AddForeignKey
ALTER TABLE "Goals" ADD CONSTRAINT "Goals_goal_team_id_fkey" FOREIGN KEY ("goal_team_id") REFERENCES "teams"("team_id") ON DELETE RESTRICT 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 RESTRICT ON UPDATE CASCADE;
