mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-05 07:15:31 +08:00
feat(admin): XHProf 性能日志五张表 Scheme 迁移与模型
This commit is contained in:
22
database/migrations/20260814100002_xhprof_run_detail.php
Normal file
22
database/migrations/20260814100002_xhprof_run_detail.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
/**
|
||||
* XHProf 性能日志 - 采样原始 profile 数据表
|
||||
*
|
||||
* 显式豁免表:不进后台(无 CURD 页面)、无 create_time 等约定字段、无额外索引。
|
||||
* id 与 ul_xhprof_run.id 一一对应(非自增),查询入口即主键。
|
||||
*/
|
||||
class XhprofRunDetail extends Migrator
|
||||
{
|
||||
public function change()
|
||||
{
|
||||
$table = $this->table('xhprof_run_detail', ['id' => false, 'primary_key' => ['id']])
|
||||
->setComment('XHProf 采样原始 profile 数据(按 run 1:1,不进后台)')
|
||||
->addColumn('id', 'integer', ['limit' => 11, 'null' => false, 'signed' => false, 'comment' => '主键,值=ul_xhprof_run.id(不自增)'])
|
||||
->addColumn('profile_data', 'text', ['length' => MysqlAdapter::TEXT_LONG, 'null' => true, 'comment' => '原始 profile JSON'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user