$result) { if (!empty($result['ok'])) { $ok++; } else { $failed = $name . ': ' . ($result['message'] ?? 'failed'); break; } } if ($failed !== '') { acp_flash_error(h($failed)); } else { acp_log('system.migrations', '', ['applied' => array_keys($results)]); acp_flash_success('Applied ' . $ok . ' migration' . ($ok === 1 ? '' : 's') . '.'); } } acp_redirect('migrations'); } if ($action === 'run_one') { $name = basename((string)($_POST['migration'] ?? '')); $result = znote_migration_run($name); if (!empty($result['ok'])) { acp_log('system.migration', $name, ['statements' => $result['statements'] ?? 0]); acp_flash_success(h($name) . ': ' . h((string)$result['message'])); } else { acp_flash_error(h($name) . ': ' . h((string)$result['message'])); } acp_redirect('migrations'); } acp_redirect('migrations'); } $status = znote_migrations_status(); $pending = array_filter($status, static fn(array $row): bool => $row['state'] === 'pending'); $applied = array_filter($status, static fn(array $row): bool => $row['state'] === 'applied'); $warnings = array_filter($status, static fn(array $row): bool => in_array($row['state'], array('changed', 'missing'), true)); ?>

Database migrations

Runs SQL files from SQL/migrations and records successful executions in znote_migrations.

Migration Status Checksum Executed Time Action

bytes
Never ms -
File changed Missing Done
Use this page after pulling/updating ZnoteX. Payment IPNs and normal visitors never run migrations; only admins can apply them here.