diff --git a/prisma/migrations/20260507151706_drop_award_master_role/migration.sql b/prisma/migrations/20260507151706_drop_award_master_role/migration.sql index 95d6e9e..670e1fb 100644 --- a/prisma/migrations/20260507151706_drop_award_master_role/migration.sql +++ b/prisma/migrations/20260507151706_drop_award_master_role/migration.sql @@ -22,8 +22,10 @@ ALTER TABLE "User" ALTER COLUMN role TYPE "UserRole_new" USING role::text::"UserRole_new"; ALTER TABLE "User" ALTER COLUMN role SET DEFAULT 'APPLICANT'; +ALTER TABLE "User" ALTER COLUMN roles DROP DEFAULT; ALTER TABLE "User" ALTER COLUMN roles TYPE "UserRole_new"[] USING roles::text[]::"UserRole_new"[]; +ALTER TABLE "User" ALTER COLUMN roles SET DEFAULT '{}'::"UserRole_new"[]; DROP TYPE "UserRole"; ALTER TYPE "UserRole_new" RENAME TO "UserRole";