Need help with a migration

This was my old enum:
export const securityEnum = pgEnum("security", ["none", "minimal", "regular", "advanced"])


And this is my new one:
export const securityEnum = pgEnum("security", ["none", "hwid", "hwid_ip"])


I ran generate --custom to make a blank migration file, and wrote this custom script:
ALTER TYPE "security" ADD VALUE 'hwid';

--> statement-breakpoint
ALTER TYPE "security" ADD VALUE 'hwid_ip';

--> statement-breakpoint
COMMIT;

--> statement-breakpoint
UPDATE apps
SET
  security = 'hwid'
WHERE
  security = 'minimal';

--> statement-breakpoint
UPDATE apps
SET
  security = 'hwid_ip'
WHERE
  security IN ('regular', 'advanced');

--> statement-breakpoint
ALTER TYPE "security"
DROP VALUE 'minimal';

--> statement-breakpoint
ALTER TYPE "security"
DROP VALUE 'regular';

--> statement-breakpoint
ALTER TYPE "security"
DROP VALUE 'advanced';

--> statement-breakpoint
ALTER TABLE "apps"
ALTER COLUMN "security"
SET DEFAULT 'hwid_ip';


Sadly, this did not work and I get this output in my terminal:
image.png
Was this page helpful?