HackmanCMS/bin/migrate.php
2026-05-03 20:56:15 +03:00

10 lines
309 B
PHP
Executable file

#!/usr/bin/env php
<?php
define('ROOT', dirname(__DIR__));
$config = require ROOT . '/config/config.php';
require_once ROOT . '/lib/DB.php';
DB::connect($config['db_path']);
$applied = DB::autoMigrate(ROOT . '/sql');
foreach ($applied as $v) echo " applied: $v\n";
if (!$applied) echo " Nothing to do.\n";