mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
style(runtime): 统一入口脚本与迁移文件格式
This commit is contained in:
parent
46c92cee8b
commit
36362fab08
@ -17,7 +17,6 @@ declare(strict_types=1);
|
||||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
use app\admin\Service;
|
||||
use think\admin\extend\PhinxExtend;
|
||||
use think\admin\model\SystemConfig;
|
||||
|
||||
@ -55,7 +55,7 @@ class DbIndexStruct extends Command
|
||||
$number = 1;
|
||||
$renamed = 0;
|
||||
foreach ($tables as $table) {
|
||||
$this->output->writeln(sprintf("[%s/%s] 开始处理表 %s", $number++, $total, $table));
|
||||
$this->output->writeln(sprintf('[%s/%s] 开始处理表 %s', $number++, $total, $table));
|
||||
$indexes = [];
|
||||
foreach (Db::query(sprintf('SHOW INDEX FROM `%s`', $table)) as $index) {
|
||||
$keyName = strval($index['Key_name'] ?? '');
|
||||
|
||||
@ -1,23 +1,26 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | ThinkAdmin Plugin for ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | 官方网站: https://thinkadmin.top
|
||||
* +----------------------------------------------------------------------
|
||||
* | 开源协议 ( https://mit-license.org )
|
||||
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||||
* +----------------------------------------------------------------------
|
||||
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
use think\admin\service\RuntimeService;
|
||||
|
||||
// 加载基础文件
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// WEB应用初始化
|
||||
RuntimeService::doWebsiteInit();
|
||||
RuntimeService::doWebsiteInit();
|
||||
|
||||
@ -1,22 +1,24 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | ThinkAdmin Plugin for ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | 官方网站: https://thinkadmin.top
|
||||
* +----------------------------------------------------------------------
|
||||
* | 开源协议 ( https://mit-license.org )
|
||||
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||||
* +----------------------------------------------------------------------
|
||||
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
if (is_file($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'])) {
|
||||
return false;
|
||||
} else {
|
||||
$_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/index.php';
|
||||
require $_SERVER['SCRIPT_FILENAME'];
|
||||
}
|
||||
}
|
||||
$_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/index.php';
|
||||
require $_SERVER['SCRIPT_FILENAME'];
|
||||
|
||||
33
think
33
think
@ -1,24 +1,27 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Static Plugin for ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: https://thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | ThinkAdmin Plugin for ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | 官方网站: https://thinkadmin.top
|
||||
* +----------------------------------------------------------------------
|
||||
* | 开源协议 ( https://mit-license.org )
|
||||
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||||
* +----------------------------------------------------------------------
|
||||
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
use think\admin\service\RuntimeService;
|
||||
|
||||
// 加载基础文件
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// 命令行应用初始化
|
||||
RuntimeService::doConsoleInit();
|
||||
RuntimeService::doConsoleInit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user