Commit 74f7db17 authored by Fares's avatar Fares

fix(data): archive separated child from membership 1701

Retroactive fix for child that was separated but not archived from the
parent's family tree due to the old code not setting is_archived=1.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent eadd0553
<?php
declare(strict_types=1);
return static function (\App\Core\Database $db): void {
// Archive separated children under membership number 1701
// These children were separated (فصل) but the old code didn't set is_archived=1
$db->query(
"UPDATE children c
JOIN members m ON m.id = c.member_id
SET c.is_archived = 1,
c.archived_at = NOW(),
c.updated_at = NOW()
WHERE m.membership_number = '1701'
AND c.status = 'separated'
AND c.is_archived = 0"
);
};
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