| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- declare(strict_types=1);
- use Phinx\Migration\AbstractMigration;
- final class LimitPurchaseRule extends AbstractMigration
- {
- public function change(): void
- {
- $this->table('limit_purchase_rule', ['comment' => '限购规则表'])
- ->addColumn('name', 'string', [
- 'length' => 64,
- 'comment' => '规则名称',
- ])
- ->addColumn('regions', 'json', [
- 'null' => true,
- 'comment' => '限购地区 JSON',
- ])
- ->addColumn('is_default', 'tinyinteger', [
- 'limit' => 1,
- 'signed' => false,
- 'default' => 0,
- 'comment' => '是否默认规则:0 否,1 是',
- ])
- ->addColumn('status', 'tinyinteger', [
- 'limit' => 1,
- 'signed' => false,
- 'default' => 1,
- 'comment' => '状态:1 启用,0 停用',
- ])
- ->addTimestamps('create_time', 'update_time')
- ->create();
- }
- }
|