Make DB migrator work for both docker and baremetal

This commit is contained in:
ellite 2023-11-16 21:40:30 +01:00
parent 6bfedf870a
commit 98e97ef08d

View File

@ -1,6 +1,20 @@
<?php
function errorHandler($severity, $message, $file, $line) {
throw new ErrorException($message, 0, $severity, $file, $line);
}
// Set the custom error handler
set_error_handler('errorHandler');
/** @var \SQLite3 $db */
require_once 'includes/connect.php';
try {
require_once 'includes/connect_endpoint_crontabs.php';
} catch (Exception $e) {
require_once '../../includes/connect_endpoint.php';
} finally {
// Restore the default error handler
restore_error_handler();
}
$completedMigrations = [];