| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241121155532AlterTableCloudStockLevel
- */
- class M241121155532AlterTableCloudStockLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<EOF
- ALTER TABLE `qimall_addons_cloud_stock_level`
- ADD COLUMN `upgrade_type_store_goods` tinyint(1) NOT NULL DEFAULT 0 COMMENT '购买门店商品升级 0关闭 1 开启',
- ADD COLUMN `upgrade_store_goods_list` text NULL COMMENT '门店商品升级条件';
- EOF;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241121155532AlterTableCloudStockLevel cannot be reverted.\n";
- return false;
- }
- }
|