DB数据库文件
This commit is contained in:
16
server/db/run_backfill_dept_id.php
Normal file
16
server/db/run_backfill_dept_id.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
define('BASE_PATH', dirname(__DIR__));
|
||||
require_once BASE_PATH . '/vendor/autoload.php';
|
||||
\Dotenv\Dotenv::createUnsafeMutable(BASE_PATH)->load();
|
||||
\Webman\Config::load(BASE_PATH . '/config', ['route', 'plugin']);
|
||||
\Webman\ThinkOrm\ThinkOrm::start(null);
|
||||
|
||||
use app\dice\service\DiceChannelConfigService;
|
||||
|
||||
$service = new DiceChannelConfigService();
|
||||
echo "修复无效渠道引用...\n";
|
||||
print_r($service->repairOrphanDeptReferences());
|
||||
echo "\n回填 dept_id...\n";
|
||||
print_r($service->backfillDataDeptId());
|
||||
echo "完成。\n";
|
||||
Reference in New Issue
Block a user