/*
  Warnings:

  - You are about to drop the column `teamId` on the `user_rule_profit_report_entity` table. All the data in the column will be lost.
  - You are about to drop the column `userId` on the `user_rule_profit_report_entity` table. All the data in the column will be lost.
  - Added the required column `setId` to the `user_rule_profit_report_entity` table without a default value. This is not possible if the table is not empty.

*/
-- DropForeignKey
ALTER TABLE "user_rule_profit_report_entity" DROP CONSTRAINT "user_rule_profit_report_entity_teamId_fkey";

-- DropForeignKey
ALTER TABLE "user_rule_profit_report_entity" DROP CONSTRAINT "user_rule_profit_report_entity_userId_fkey";

-- AlterTable
ALTER TABLE "user_rule_profit_report_entity" DROP COLUMN "teamId",
DROP COLUMN "userId",
ADD COLUMN     "setId" INTEGER NOT NULL;

-- AddForeignKey
ALTER TABLE "user_rule_profit_report_entity" ADD CONSTRAINT "user_rule_profit_report_entity_setId_fkey" FOREIGN KEY ("setId") REFERENCES "tiered_payout_target_set"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
