|
|
@@ -1,7 +1,6 @@
|
|
|
<?php
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
-use Phinx\Db\Table\Column;
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
|
|
class ExtensionBalpayLog extends AbstractMigration
|
|
|
@@ -30,13 +29,13 @@ class ExtensionBalpayLog extends AbstractMigration
|
|
|
public function change(): void
|
|
|
{
|
|
|
$table = $this->table('extension_balpay_log', ['commonts' => '余额支付日志']);
|
|
|
- $table->addColumn(Column::integer('user_id')->setUnsigned()->setComment('用户ID'))
|
|
|
- ->addColumn(Column::integer('order_id')->setUnsigned()->setDefault(0)->setComment('订单ID(可为0)'))
|
|
|
- ->addColumn(Column::integer('type')->setUnsigned()->setDefault(0)->setComment('流水类型:1-充值 2-消费 3-退款 4-冻结 5-解冻'))
|
|
|
- ->addColumn(Column::decimal('amount', 10, 2)->setComment('金额'))
|
|
|
- ->addColumn(Column::decimal('balance', 10, 2)->setComment('当前余额'))
|
|
|
- ->addColumn(Column::string('description')->setLimit(255)->setComment('描述'))
|
|
|
- ->addTimestamps()
|
|
|
+ $table->addColumn('user_id', 'integer', ['signed' => false, 'comment' => '用户ID'])
|
|
|
+ ->addColumn('order_id', 'integer', ['signed' => false, 'default' => 0, 'comment' => '订单ID(可为0)'])
|
|
|
+ ->addColumn('type', 'integer', ['signed' => false, 'default' => 0, 'comment' => '流水类型:1-充值 2-消费 3-退款 4-冻结 5-解冻'])
|
|
|
+ ->addColumn('amount', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '金额'])
|
|
|
+ ->addColumn('balance', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '当前余额'])
|
|
|
+ ->addColumn('description', 'string', ['limit' => 255, 'comment' => '描述'])
|
|
|
+ ->addTimestamps('create_time', 'update_time')
|
|
|
->create();
|
|
|
}
|
|
|
}
|