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