/*
  Warnings:

  - You are about to drop the column `isReferral` on the `tiered_payout_rule` table. All the data in the column will be lost.
  - You are about to drop the column `type` on the `tiered_payout_rule` table. All the data in the column will be lost.
  - Added the required column `entityType` to the `tiered_payout_rule` table without a default value. This is not possible if the table is not empty.
  - Added the required column `ruleType` to the `tiered_payout_rule` table without a default value. This is not possible if the table is not empty.

*/
-- CreateEnum
CREATE TYPE "RuleType" AS ENUM ('SELF', 'TEAM_LEAD', 'REFERRAL');

-- CreateEnum
CREATE TYPE "TieredPayoutRuleEntityType" AS ENUM ('TEAM', 'USER');

-- AlterTable
ALTER TABLE "tiered_payout_rule" DROP COLUMN "isReferral",
DROP COLUMN "type",
ADD COLUMN     "entityType" "TieredPayoutRuleEntityType" NOT NULL,
ADD COLUMN     "ruleType" "RuleType" NOT NULL;

-- DropEnum
DROP TYPE "TieredPayoutRuleType";
