mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-12 14:28:09 +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
|
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||||
* +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use app\admin\Service;
|
use app\admin\Service;
|
||||||
use think\admin\extend\PhinxExtend;
|
use think\admin\extend\PhinxExtend;
|
||||||
use think\admin\model\SystemConfig;
|
use think\admin\model\SystemConfig;
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class DbIndexStruct extends Command
|
|||||||
$number = 1;
|
$number = 1;
|
||||||
$renamed = 0;
|
$renamed = 0;
|
||||||
foreach ($tables as $table) {
|
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 = [];
|
$indexes = [];
|
||||||
foreach (Db::query(sprintf('SHOW INDEX FROM `%s`', $table)) as $index) {
|
foreach (Db::query(sprintf('SHOW INDEX FROM `%s`', $table)) as $index) {
|
||||||
$keyName = strval($index['Key_name'] ?? '');
|
$keyName = strval($index['Key_name'] ?? '');
|
||||||
|
|||||||
@ -1,19 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
declare(strict_types=1);
|
||||||
// | Static Plugin for ThinkAdmin
|
/**
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
* | ThinkAdmin Plugin for ThinkAdmin
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 官方网站: https://thinkadmin.top
|
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 开源协议 ( https://mit-license.org )
|
* | 官方网站: https://thinkadmin.top
|
||||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
* +----------------------------------------------------------------------
|
||||||
// +----------------------------------------------------------------------
|
* | 开源协议 ( https://mit-license.org )
|
||||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
|
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||||
|
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
use think\admin\service\RuntimeService;
|
use think\admin\service\RuntimeService;
|
||||||
|
|
||||||
// 加载基础文件
|
// 加载基础文件
|
||||||
|
|||||||
@ -1,22 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
declare(strict_types=1);
|
||||||
// | Static Plugin for ThinkAdmin
|
/**
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
* | ThinkAdmin Plugin for ThinkAdmin
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 官方网站: https://thinkadmin.top
|
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 开源协议 ( https://mit-license.org )
|
* | 官方网站: https://thinkadmin.top
|
||||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
* +----------------------------------------------------------------------
|
||||||
// +----------------------------------------------------------------------
|
* | 开源协议 ( https://mit-license.org )
|
||||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
* | 会员特权 ( 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'])) {
|
if (is_file($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'])) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
|
||||||
$_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/index.php';
|
|
||||||
require $_SERVER['SCRIPT_FILENAME'];
|
|
||||||
}
|
}
|
||||||
|
$_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/index.php';
|
||||||
|
require $_SERVER['SCRIPT_FILENAME'];
|
||||||
|
|||||||
31
think
31
think
@ -1,20 +1,23 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
declare(strict_types=1);
|
||||||
// | Static Plugin for ThinkAdmin
|
/**
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 版权所有 2014~2025 ThinkAdmin [ thinkadmin.top ]
|
* | ThinkAdmin Plugin for ThinkAdmin
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 官方网站: https://thinkadmin.top
|
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
// | 开源协议 ( https://mit-license.org )
|
* | 官方网站: https://thinkadmin.top
|
||||||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
* +----------------------------------------------------------------------
|
||||||
// +----------------------------------------------------------------------
|
* | 开源协议 ( https://mit-license.org )
|
||||||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-static
|
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||||||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-static
|
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||||||
// +----------------------------------------------------------------------
|
* +----------------------------------------------------------------------
|
||||||
|
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||||||
|
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||||||
|
* +----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
use think\admin\service\RuntimeService;
|
use think\admin\service\RuntimeService;
|
||||||
|
|
||||||
// 加载基础文件
|
// 加载基础文件
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user