Files
ulthon_admin/database/migrations/20260814100002_xhprof_run_detail.php

23 lines
922 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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();
}
}