/*
  Warnings:

  - The values [SUPPORTIVE,ANAYLTICS,MOTIVATIONAL,GIRLFRIEND,BOYFRIEND] on the enum `AIChatTypes` will be removed. If these variants are still used in the database, this will fail.
  - A unique constraint covering the columns `[chatType]` on the table `AIChatRoom` will be added. If there are existing duplicate values, this will fail.
  - A unique constraint covering the columns `[email]` on the table `NewsLetter` will be added. If there are existing duplicate values, this will fail.

*/
-- AlterEnum
BEGIN;
CREATE TYPE "public"."AIChatTypes_new" AS ENUM ('supportive', 'analytics', 'motivational', 'girlfriend', 'boyfriend', 'emotional', 'mental', 'physical');
ALTER TABLE "public"."AIChatRoom" ALTER COLUMN "chatType" DROP DEFAULT;
ALTER TABLE "public"."AIChatRoom" ALTER COLUMN "chatType" TYPE "public"."AIChatTypes_new" USING ("chatType"::text::"public"."AIChatTypes_new");
ALTER TYPE "public"."AIChatTypes" RENAME TO "AIChatTypes_old";
ALTER TYPE "public"."AIChatTypes_new" RENAME TO "AIChatTypes";
DROP TYPE "public"."AIChatTypes_old";
ALTER TABLE "public"."AIChatRoom" ALTER COLUMN "chatType" SET DEFAULT 'supportive';
COMMIT;

-- DropIndex
DROP INDEX "public"."AIChatRoom_userId_key";

-- AlterTable
ALTER TABLE "public"."AIChatRoom" ALTER COLUMN "chatType" SET DEFAULT 'supportive';

-- CreateIndex
CREATE UNIQUE INDEX "AIChatRoom_chatType_key" ON "public"."AIChatRoom"("chatType");

-- CreateIndex
CREATE UNIQUE INDEX "NewsLetter_email_key" ON "public"."NewsLetter"("email");
