47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
![]() |
<?php
|
||
|
|
||
|
use think\admin\extend\PhinxExtend;
|
||
|
use think\migration\Migrator;
|
||
|
|
||
|
@set_time_limit(0);
|
||
|
@ini_set('memory_limit', -1);
|
||
|
|
||
|
class InstallDaxiangkaTable extends Migrator
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* 创建数据库
|
||
|
*/
|
||
|
public function change()
|
||
|
{
|
||
|
$this->_create_daxiangka_heidui();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 创建数据对象
|
||
|
* @class DaxiangkaHeidui
|
||
|
* @table daxiangka_heidui
|
||
|
* @return void
|
||
|
*/
|
||
|
private function _create_daxiangka_heidui()
|
||
|
{
|
||
|
// 创建数据表对象
|
||
|
$table = $this->table('daxiangka_heidui', [
|
||
|
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '',
|
||
|
]);
|
||
|
// 创建或更新数据表
|
||
|
PhinxExtend::upgrade($table, [
|
||
|
['order_id', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['merchant_order_id', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['status', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['time', 'time', ['default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['cash', 'integer', ['default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['num', 'integer', ['default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
['card', 'string', ['limit' => 255, 'default' => NULL, 'null' => true, 'comment' => '']],
|
||
|
], [
|
||
|
|
||
|
], false);
|
||
|
}
|
||
|
|
||
|
}
|