Commit ffbaa774 authored by Fares's avatar Fares

fix(transfers): add missing marriage_date column to transfer_requests

The column was in the model's fillable but never had a migration. Causes
'Column not found' error when storing female child separation requests.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent a4e9cc61
<?php
declare(strict_types=1);
return [
'up' => function (\App\Core\Database $db): void {
$exists = $db->selectOne(
"SELECT 1 FROM information_schema.COLUMNS
WHERE table_schema = DATABASE() AND table_name = 'transfer_requests' AND column_name = 'marriage_date'",
[]
);
if (!$exists) {
$db->raw("ALTER TABLE transfer_requests ADD COLUMN marriage_date DATE NULL DEFAULT NULL AFTER work_date");
}
},
'down' => "ALTER TABLE transfer_requests DROP COLUMN IF EXISTS marriage_date;",
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment