index update
This commit is contained in:
parent
6d25117591
commit
4fa7d93ff6
11
index.php
11
index.php
@ -102,6 +102,10 @@ if (!function_exists('runtime_debug_infer_schema_hint')) {
|
||||
function runtime_debug_infer_schema_hint(Throwable $throwable): ?string {
|
||||
$message = $throwable->getMessage();
|
||||
|
||||
if (str_contains($message, 'Call to undefined method DatabaseInstaller::ensureCurrentSchema()')) {
|
||||
return 'Outdated installer class: re-sync includes/DatabaseInstaller.php with the latest project version.';
|
||||
}
|
||||
|
||||
if (preg_match("/Table '[^']+\.([^']+)' doesn't exist/i", $message, $matches)) {
|
||||
return 'Missing table: ' . $matches[1];
|
||||
}
|
||||
@ -301,9 +305,12 @@ require_once 'includes/DatabaseInstaller.php';
|
||||
try {
|
||||
if (!DatabaseInstaller::isInstalled()) {
|
||||
DatabaseInstaller::install();
|
||||
} elseif (method_exists('DatabaseInstaller', 'ensureCurrentSchema')) {
|
||||
DatabaseInstaller::ensureCurrentSchema();
|
||||
} else {
|
||||
error_log('Skipping DatabaseInstaller::ensureCurrentSchema() because the loaded DatabaseInstaller class does not define it.');
|
||||
}
|
||||
DatabaseInstaller::ensureCurrentSchema();
|
||||
} catch (Exception $e) {
|
||||
} catch (Throwable $e) {
|
||||
die("Installation Error: " . $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user