<?php
if (PHP_SAPI !== 'cli') {
    http_response_code(403);
    exit("Schema maintenance hanya boleh dijalankan melalui CLI.\n");
}

putenv('APP_AUTO_MIGRATE=true');
require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'db.php';

echo "Schema maintenance selesai untuk database " . (getenv('DB_NAME') ?: 'sistem_fail_mainpp') . ".\n";
