25 lines
537 B
PHP
25 lines
537 B
PHP
<?php
|
|
|
|
include_once "./lib/db.php";
|
|
|
|
class HealthDB {
|
|
private Florm $florm;
|
|
function __construct() {
|
|
$this->florm = new Florm("/var/www/data/health.sqlite", [
|
|
"create table if not exists healthcheck (
|
|
timestamp integer,
|
|
job text,
|
|
success integer,
|
|
data blob
|
|
)",
|
|
"create index idx_healthcheck_timestamp_job on healthcheck(timestamp, job)",
|
|
"create index idx_healthcheck_timestamp on healthcheck(timestamp)",
|
|
]);
|
|
}
|
|
function florm(): Florm {
|
|
return $this->florm;
|
|
}
|
|
}
|
|
|
|
?>
|