|
|
@ -0,0 +1,28 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use yii\db\Migration; |
|
|
|
|
|
|
|
/** |
|
|
|
* Class m191121_111825_update_column_type_in_table_antgoods_attribute |
|
|
|
*/ |
|
|
|
class m191121_111825_update_column_type_in_table_antgoods_attribute extends Migration |
|
|
|
{ |
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
public function up() |
|
|
|
{ |
|
|
|
$this->dropColumn('antgoods_attribute', 'type'); |
|
|
|
$this->addColumn('antgoods_attribute', 'type', $this->smallInteger(2)->notNull()->defaultValue(1)->comment('类型:1:商品sku属性')); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
public function down() |
|
|
|
{ |
|
|
|
$this->dropColumn('antgoods_attribute', 'type'); |
|
|
|
$this->addColumn('antgoods_attribute', 'type', $this->smallInteger(2)->defaultValue(null)->comment('类型')); |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |