| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * 权重等级添加权重说明字段
- * Class M250506151432AlterTableCloudStockLevel
- */
- class M250506151432AlterTableCloudStockLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_cloud_stock_level`
- ADD COLUMN `detail` text NULL COMMENT '等级权重说明';
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250506151432AlterTableCloudStockLevel cannot be reverted.\n";
- return false;
- }
- }
|