linyaostalker
5 years ago
5 changed files with 53 additions and 14 deletions
-
20vendor/antgoods/goods/src/migrations/m191125_104137_drop_column_icon_type_in_table_antgoods_shop_category.php
-
26vendor/antgoods/goods/src/migrations/m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category.php
-
10vendor/antgoods/goods/src/models/searchs/CategorySearch.php
-
7vendor/antgoods/goods/src/models/searchs/ShopCategorySearch.php
-
4vendor/antgoods/goods/src/views/shopcategory/_form.php
@ -0,0 +1,20 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use yii\db\Migration; |
||||
|
|
||||
|
/** |
||||
|
* Class m191125_104137_drop_column_icon_type_in_table_antgoods_shop_category |
||||
|
*/ |
||||
|
class m191125_104137_drop_column_icon_type_in_table_antgoods_shop_category extends Migration |
||||
|
{ |
||||
|
public function up() |
||||
|
{ |
||||
|
$this->dropColumn('antgoods_shop_category', 'icon_type'); |
||||
|
} |
||||
|
|
||||
|
public function down() |
||||
|
{ |
||||
|
$this->addColumn('antgoods_shop_category', 'icon_type', $this->tinyInteger(1)->defaultValue(null)->comment('图标类型')); |
||||
|
return true; |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use yii\db\Migration; |
||||
|
|
||||
|
/** |
||||
|
* Class m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category |
||||
|
*/ |
||||
|
class m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category extends Migration |
||||
|
{ |
||||
|
public function up() |
||||
|
{ |
||||
|
$this->dropColumn('antgoods_shop_category', 'icon'); |
||||
|
$this->addColumn('antgoods_shop_category', 'icon', $this->integer(11)->defaultValue(null)->comment('图标')); |
||||
|
$this->dropColumn('antgoods_shop_category', 'pid'); |
||||
|
$this->addColumn('antgoods_shop_category', 'pid', $this->integer(11)->defaultValue(0)->comment('父级id')); |
||||
|
} |
||||
|
|
||||
|
public function down() |
||||
|
{ |
||||
|
$this->dropColumn('antgoods_shop_category', 'icon'); |
||||
|
$this->addColumn('antgoods_shop_category', 'icon', $this->string(64)->defaultValue(null)->comment('图标')); |
||||
|
$this->dropColumn('antgoods_shop_category', 'pid'); |
||||
|
$this->addColumn('antgoods_shop_category', 'pid', $this->integer(11)->defaultValue(null)->comment('父级id')); |
||||
|
return true; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue