Files
AnimeTV-Backend/prisma/migrations/20260422050909_change_enum_season/migration.sql
Rafi Arrafif 16d8c00d75
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 1m14s
🗃️ db: fix schema drift and correct season enum
2026-04-22 12:18:56 +07:00

15 lines
488 B
PL/PgSQL

/*
Warnings:
- The values [Winter,Spring,Summer,Fall] on the enum `Season` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "Season_new" AS ENUM ('winter', 'spring', 'summer', 'fall');
ALTER TABLE "medias" ALTER COLUMN "season" TYPE "Season_new" USING ("season"::text::"Season_new");
ALTER TYPE "Season" RENAME TO "Season_old";
ALTER TYPE "Season_new" RENAME TO "Season";
DROP TYPE "public"."Season_old";
COMMIT;