| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * 创建门店收银台区域奖励分佣字段
- * Class M240919120545AlterAddonsStoreSettings
- */
- class M240919120545AlterAddonsStoreSettings extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_store_settings`
- ADD COLUMN `cashier_area_settings` text NULL COMMENT '收银台区域奖励配置' AFTER `cashier_agent_settings`;
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo '迁移失败:' . $e->getMessage();
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240919120545AlterAddonsStoreSettings cannot be reverted.\n";
- return false;
- }
- }
|