20 lines
416 B
PHP
20 lines
416 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../db/config.php';
|
|
|
|
function ensure_tables(): void {
|
|
static $initialized = false;
|
|
if ($initialized) {
|
|
return;
|
|
}
|
|
$path = __DIR__ . '/../db/migrations/20260306_001_letters.sql';
|
|
if (file_exists($path)) {
|
|
$sql = file_get_contents($path);
|
|
if ($sql !== false && trim($sql) !== '') {
|
|
db()->exec($sql);
|
|
}
|
|
}
|
|
$initialized = true;
|
|
}
|