db: delete user role enum def

This commit is contained in:
Mahen 2026-02-13 19:38:04 +07:00
parent 0852fd37a8
commit 641bc5bfcf
2 changed files with 22 additions and 11 deletions

View File

@ -0,0 +1,16 @@
/*
Warnings:
- The values [male,female,other] on the enum `UserGender` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "UserGender_new" AS ENUM ('MALE', 'FEMALE', 'OTHER');
ALTER TYPE "UserGender" RENAME TO "UserGender_old";
ALTER TYPE "UserGender_new" RENAME TO "UserGender";
DROP TYPE "public"."UserGender_old";
COMMIT;
-- DropEnum
DROP TYPE "Role";

View File

@ -7,14 +7,9 @@ datasource db {
} }
enum UserGender { enum UserGender {
male MALE
female FEMALE
other OTHER
}
enum Role {
USER
ADMIN
} }
enum Sentiment { enum Sentiment {
@ -80,13 +75,13 @@ model VerificationToken {
} }
model User { model User {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
name String? name String?
email String? @unique email String? @unique
emailVerified DateTime? emailVerified DateTime?
image String? image String?
password String? password String?
bio String? @db.Text bio String? @db.Text
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt