/*
  Warnings:

  - The values [OBLIGATED_COURSE] on the enum `EVENT_TYPE` will be removed. If these variants are still used in the database, this will fail.

*/
-- AlterEnum
BEGIN;
CREATE TYPE "EVENT_TYPE_new" AS ENUM ('COURSE', 'PILOT_STARTER', 'DISPATCH_STARTER', 'EVENT');
ALTER TABLE "Event" ALTER COLUMN "type" DROP DEFAULT;
ALTER TABLE "Event" ALTER COLUMN "type" TYPE "EVENT_TYPE_new" USING ("type"::text::"EVENT_TYPE_new");
ALTER TYPE "EVENT_TYPE" RENAME TO "EVENT_TYPE_old";
ALTER TYPE "EVENT_TYPE_new" RENAME TO "EVENT_TYPE";
DROP TYPE "EVENT_TYPE_old";
ALTER TABLE "Event" ALTER COLUMN "type" SET DEFAULT 'EVENT';
COMMIT;
