| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240621021425AddColumnAgentLevel
- */
- class M240621021425AddColumnAgentLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_agent_level`
- ADD COLUMN `upgrade_type_store_goods` smallint(6) NOT NULL DEFAULT 0 COMMENT '购买门店商品升级 0关闭 1 开启',
- ADD COLUMN `buy_store_goods_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0订单完成 1下单 完成',
- ADD COLUMN `store_goods_type` smallint(6) NOT NULL DEFAULT 0 COMMENT '门店商品升级类型',
- ADD COLUMN `store_goods_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '门店商品仓库的ID',
- ADD COLUMN `store_goods_list` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '门店商品列表';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240621021425AddColumnAgentLevel cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240621021425AddColumnAgentLevel cannot be reverted.\n";
- return false;
- }
- */
- }
|