Skip to content

Commit

Permalink
update enum trimester
Browse files Browse the repository at this point in the history
  • Loading branch information
mhd-hi committed Aug 3, 2024
1 parent 84f24f6 commit 261d3ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion prisma/ERD.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
Warnings:
- The values [A,E,H] on the enum `Trimester` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "Trimester_new" AS ENUM ('AUTOMNE', 'ETE', 'HIVER');
ALTER TABLE "Session" ALTER COLUMN "trimester" TYPE "Trimester_new" USING ("trimester"::text::"Trimester_new");
ALTER TYPE "Trimester" RENAME TO "Trimester_old";
ALTER TYPE "Trimester_new" RENAME TO "Trimester";
DROP TYPE "Trimester_old";
COMMIT;
6 changes: 3 additions & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ datasource db {
}

enum Trimester {
A
E
H
AUTOMNE
ETE
HIVER
}

model Session {
Expand Down

0 comments on commit 261d3ec

Please sign in to comment.