mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
26 lines
555 B
PHP
26 lines
555 B
PHP
<?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]);
|
|
}
|
|
}
|
|
}
|