| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241009102932AlterTableCloudStockAgent
- */
- class M241009102932AlterTableCloudStockAgent extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<EOF
- ALTER TABLE `qimall_addons_cloud_stock_agent`
- MODIFY COLUMN `upgrade_status` tinyint(6) NOT NULL DEFAULT 3 COMMENT '升级类型;1条件升级;2升级礼包;3平台添加;4上级添加,5购买商品升级' AFTER `frozen_price`;
- EOF;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241009102932AlterTableCloudStockAgent cannot be reverted.\n";
- return false;
- }
- }
|