| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace addons\StarChain\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240903153309AddColumnDeliveryToItem
- */
- class M240903153309AddColumnDeliveryToItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_star_chain_order_item`
- ADD COLUMN `delivery_sn` varchar(64) NULL DEFAULT '' COMMENT '物流编号' AFTER `num`,
- ADD COLUMN `delivery_corp_sn` varchar(64) NULL DEFAULT '' COMMENT '物流公司编号' AFTER `delivery_sn`,
- ADD COLUMN `send_status` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发货状态 0未发货 1已发货' AFTER `delivery_corp_sn`;
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240903153309AddColumnDeliveryToItem cannot be reverted.\n";
- return false;
- }
- }
|