mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-24 17:01:44 +08:00
29 lines
645 B
PHP
29 lines
645 B
PHP
<?php
|
|
|
|
use Phinx\Db\Adapter\MysqlAdapter;
|
|
|
|
class Schema202102151230 extends Phinx\Migration\AbstractMigration
|
|
{
|
|
|
|
public function up()
|
|
{
|
|
$this->table('kg_task')
|
|
->addColumn('max_try_count', 'integer', [
|
|
'null' => false,
|
|
'default' => '0',
|
|
'limit' => MysqlAdapter::INT_REGULAR,
|
|
'signed' => false,
|
|
'comment' => '最大尝试数',
|
|
'after' => 'try_count',
|
|
])->save();
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->table('kg_task')
|
|
->removeColumn('max_try_count')
|
|
->save();
|
|
}
|
|
|
|
}
|