<?php
declare(strict_types=1);

return function (\App\Core\Database $db): void {
    $exists = $db->selectOne(
        "SELECT 1 FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'violations' AND column_name = 'proof_file'"
    );
    if (!$exists) {
        $db->raw("ALTER TABLE violations ADD COLUMN proof_file VARCHAR(255) NULL AFTER evidence_notes");
    }
};
