-- DropForeignKey
ALTER TABLE "tiered_payout_rule_target" DROP CONSTRAINT "tiered_payout_rule_target_teamId_fkey";

-- DropForeignKey
ALTER TABLE "tiered_payout_rule_target" DROP CONSTRAINT "tiered_payout_rule_target_userId_fkey";

-- AlterTable
ALTER TABLE "tiered_payout_rule_target" ALTER COLUMN "userId" DROP NOT NULL,
ALTER COLUMN "teamId" DROP NOT NULL;

-- AddForeignKey
ALTER TABLE "tiered_payout_rule_target" ADD CONSTRAINT "tiered_payout_rule_target_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "tiered_payout_rule_target" ADD CONSTRAINT "tiered_payout_rule_target_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "team"("id") ON DELETE SET NULL ON UPDATE CASCADE;
