Files
SGF/scripts/sgf-bank-guard-repair.php
2026-11-11 09:00:17 +02:00

3 lines
509 B
PHP

<?php
require __DIR__.'/sgf-single-bootstrap.php';if($tag!=='b4093c6f6707')throw new LogicException('Regression function correction only');$sql=file_get_contents($repo.'/database/sql/bank_reconciliation.sql');if(!preg_match('/CREATE FUNCTION sgf_br_guard\(\).*?END; \$\$;/s',$sql,$m))throw new LogicException('Guard declaration missing');$host->unprepared(str_replace('CREATE FUNCTION','CREATE OR REPLACE FUNCTION',$m[0]));echo json_encode(['passed'=>true,'regression_only'=>true,'data_changes'=>0]).PHP_EOL;