Apply staged updates

This commit is contained in:
2026-03-01 00:42:10 +01:00
parent 4cf7039759
commit 412e235512
16 changed files with 574 additions and 539 deletions

View File

@@ -172,13 +172,19 @@ class UpdateRepository
foreach ( $manifest['sql'] as $query ) {
$query = trim( $query );
if ( $query !== '' ) {
if ( $query === '' || strpos( $query, '--' ) === 0 ) {
continue;
}
try {
if ( $this->db->query( $query ) ) {
$success++;
} else {
$errors++;
$log[] = '[WARNING] Błąd SQL: ' . $query;
}
} catch ( \Exception $e ) {
$errors++;
$log[] = '[WARNING] Wyjątek SQL: ' . $e->getMessage() . ' | Query: ' . substr( $query, 0, 200 );
}
}