feat(scheme): 新增数据库表结构同步方案

This commit is contained in:
augushong
2026-01-09 21:08:51 +08:00
parent 1a39354287
commit 8de6b99bb3
24 changed files with 944 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace base\common\command\scheme;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\facade\Db;
class Backup extends Command
{
protected function configure()
{
$this->setName('scheme:backups')
->setDescription('List all backup tables');
}
protected function execute(Input $input, Output $output)
{
$tables = Db::query("SHOW TABLES LIKE 'ul_backup%'");
foreach ($tables as $t) {
$output->writeln(array_values($t)[0]);
}
}
}