I have an enum
enum AssignmentsEnum {
DASHBOARD_READ
REAL_TIME_READ
USER_READ
USER_CREATE
USER_UPDATE
USER_RESEND_MAIL
USER_CHANGE_STATUS
USER_BLOCK
}
And a table
model Assignment {
id Int @id @default(autoincrement())
name AssignmentsEnum @unique
description String? @db.VarChar(255)
@@map("TB_ASSIGNMENT")
@@schema("public")
}
Every time that i add new enum for AssignmentsEnum i need to run a sql to add in the Assignment table the relation:
INSERT INTO "TB_ASSIGNMENT" (name, description) VALUES ('UNATTACH_DEMAND', 'Permissão para desvincular demanda');
file: 20230321001108_assignment_enum_insert_unattach_demand
how could i do it automatized after run the migration: 20230321001108_assignment_enum_insert_unattach_demand