38960-vm/patch_final.php
2026-03-28 13:36:35 +00:00

13 lines
502 B
PHP

<?php
$content = file_get_contents('db/migrations/20260322_merge_doctors_nurses_into_hr_final.sql');
$content = str_replace(
'ALTER TABLE patient_queue ADD CONSTRAINT fk_queue_doctor_employee',
'ALTER TABLE patient_queue DROP FOREIGN KEY IF EXISTS fk_queue_doctor_employee;' . "\n" . 'ALTER TABLE patient_queue ADD CONSTRAINT fk_queue_doctor_employee',
$content
);
file_put_contents('db/migrations/20260322_merge_doctors_nurses_into_hr_final.sql', $content);
echo "Patched final.sql\n";