feat(lamaran): reset lamaran dan rollover batch, serta menambahkan snapshot posisi lamaran mhs ke tabel user
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `user` DROP FOREIGN KEY `user_id_lamaran_magang_foreign`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `user` DROP FOREIGN KEY `user_id_mahasiswa_foreign`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `user` ADD COLUMN `intern_interest_group` VARCHAR(255) NULL,
|
||||
ADD COLUMN `intern_position` VARCHAR(255) NULL,
|
||||
MODIFY `id_mahasiswa` INTEGER NULL,
|
||||
MODIFY `id_lamaran_magang` INTEGER NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `user` ADD CONSTRAINT `user_id_mahasiswa_foreign` FOREIGN KEY (`id_mahasiswa`) REFERENCES `mahasiswa`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `user` ADD CONSTRAINT `user_id_lamaran_magang_foreign` FOREIGN KEY (`id_lamaran_magang`) REFERENCES `lamaran_magang`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
+15
-13
@@ -179,20 +179,22 @@ model Batch {
|
||||
}
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
id_mahasiswa Int @unique
|
||||
id_lamaran_magang Int @unique
|
||||
full_name String @db.VarChar(255)
|
||||
email String @unique @db.VarChar(255)
|
||||
password String @db.Text
|
||||
role Role @default(intern)
|
||||
professional_bio String? @db.Text
|
||||
is_active Boolean @default(true)
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
id Int @id @default(autoincrement())
|
||||
id_mahasiswa Int? @unique
|
||||
id_lamaran_magang Int? @unique
|
||||
full_name String @db.VarChar(255)
|
||||
email String @unique @db.VarChar(255)
|
||||
password String @db.Text
|
||||
role Role @default(intern)
|
||||
professional_bio String? @db.Text
|
||||
intern_position String? @db.VarChar(255)
|
||||
intern_interest_group String? @db.VarChar(255)
|
||||
is_active Boolean @default(true)
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
mahasiswa Mahasiswa @relation(fields: [id_mahasiswa], references: [id], map: "user_id_mahasiswa_foreign")
|
||||
lamaran_magang LamaranMagang @relation(fields: [id_lamaran_magang], references: [id], map: "user_id_lamaran_magang_foreign")
|
||||
mahasiswa Mahasiswa? @relation(fields: [id_mahasiswa], references: [id], onDelete: SetNull, map: "user_id_mahasiswa_foreign")
|
||||
lamaran_magang LamaranMagang? @relation(fields: [id_lamaran_magang], references: [id], onDelete: SetNull, map: "user_id_lamaran_magang_foreign")
|
||||
project_members ProjectMember[]
|
||||
task_submissions TaskSubmission[]
|
||||
certificates Certificate[]
|
||||
|
||||
Reference in New Issue
Block a user