diff --git a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php new file mode 100644 index 0000000..4ba6c29 --- /dev/null +++ b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php @@ -0,0 +1,39 @@ +createTable('antgoods_category', [ + 'id' => $this->primaryKey(), + 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'), + 'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'), + 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'), + 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'), + 'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'), + 'icon'=>$this->string(64)->defaultValue(null)->comment('图标'), + 'is_show'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否显示,1为不显示'), + 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'), + 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), + 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), + ],$tableOptions); + } + + /** + * {@inheritdoc} + */ + public function down() + { + $this->dropTable('antgoods_category'); + return true; + } +} diff --git a/console/migrations/m191111_082739_create_table_attribute.php b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php similarity index 82% rename from console/migrations/m191111_082739_create_table_attribute.php rename to vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php index d640a25..df38219 100644 --- a/console/migrations/m191111_082739_create_table_attribute.php +++ b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php @@ -3,9 +3,9 @@ use yii\db\Migration; /** - * Class m191111_082739_create_table_attribute + * Class m191119_022939_create_table_attribute */ -class m191111_082739_create_table_attribute extends Migration +class m191119_022939_create_table_attribute extends Migration { /** * {@inheritdoc} @@ -13,7 +13,7 @@ class m191111_082739_create_table_attribute extends Migration public function up() { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="属性表"'; - $this->createTable('ats_attribute', [ + $this->createTable('antgoods_attribute', [ 'id' => $this->primaryKey(), 'name'=>$this->string(50)->defaultValue(null)->comment('属性名'), 'value'=>$this->text()->comment('属性值'), @@ -30,7 +30,7 @@ class m191111_082739_create_table_attribute extends Migration */ public function down() { - $this->dropTable('ats_attribute'); + $this->dropTable('antgoods_attribute'); return true; } }