feat(lamaran): reset lamaran dan rollover batch, serta menambahkan snapshot posisi lamaran mhs ke tabel user

This commit is contained in:
Muhammad Zhafran Ilham
2026-07-01 18:05:17 +07:00
parent dda89a7d1a
commit c31c91fb8a
6 changed files with 309 additions and 31 deletions
@@ -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;