/*
  Warnings:

  - The primary key for the `monthly_user_roi` table will be changed. If it partially fails, the table could be left without primary key constraint.
  - The `id` column on the `monthly_user_roi` table would be dropped and recreated. This will lead to data loss if there is data in the column.
  - A unique constraint covering the columns `[userId,managerId,month,year]` on the table `monthly_user_roi` will be added. If there are existing duplicate values, this will fail.

*/
-- DropIndex
DROP INDEX "monthly_user_roi_userId_month_year_key";

-- AlterTable
ALTER TABLE "monthly_user_roi" DROP CONSTRAINT "monthly_user_roi_pkey",
DROP COLUMN "id",
ADD COLUMN     "id" SERIAL NOT NULL,
ADD CONSTRAINT "monthly_user_roi_pkey" PRIMARY KEY ("id");

-- CreateIndex
CREATE UNIQUE INDEX "monthly_user_roi_userId_managerId_month_year_key" ON "monthly_user_roi"("userId", "managerId", "month", "year");
