|
@@ -1,9 +1,6 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
|
|
-use think\migration\Migrator;
|
|
|
|
|
-use think\migration\db\Column;
|
|
|
|
|
-
|
|
|
|
|
-class CreateShippingTemplateRulesTable extends Migrator
|
|
|
|
|
|
|
+class CreateShippingTemplateRulesTable extends \Phinx\Migration\AbstractMigration
|
|
|
{
|
|
{
|
|
|
public function change()
|
|
public function change()
|
|
|
{
|
|
{
|
|
@@ -14,6 +11,7 @@ class CreateShippingTemplateRulesTable extends Migrator
|
|
|
->addColumn('first_price', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '首件/首重/首体积费用'])
|
|
->addColumn('first_price', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '首件/首重/首体积费用'])
|
|
|
->addColumn('next_price', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '续件/续重/续体积费用'])
|
|
->addColumn('next_price', 'decimal', ['precision' => 10, 'scale' => 2, 'comment' => '续件/续重/续体积费用'])
|
|
|
->addColumn('area_type', 'string', ['limit' => 20, 'comment' => '区域类型: default(默认), special(特殊区域)'])
|
|
->addColumn('area_type', 'string', ['limit' => 20, 'comment' => '区域类型: default(默认), special(特殊区域)'])
|
|
|
|
|
+ ->addColumn('sort', 'integer', ['comment' => '排序', 'default' => 100])
|
|
|
->addColumn('regions', 'json', ['comment' => '地区信息(JSON格式,省级行政区划,包含地区编码和名称)', 'null' => true])
|
|
->addColumn('regions', 'json', ['comment' => '地区信息(JSON格式,省级行政区划,包含地区编码和名称)', 'null' => true])
|
|
|
->addTimestamps('create_time', 'update_time')
|
|
->addTimestamps('create_time', 'update_time')
|
|
|
->addIndex(['template_id'])
|
|
->addIndex(['template_id'])
|