| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace addons\Store\console\migrations;
- use addons\Store\common\models\StoreAdmin;
- use yii\db\Migration;
- /**
- * Class M240723160955AlterAddonsStoreSettings
- */
- class M240723160955AlterAddonsStoreSettings extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_store_settings`
- ADD COLUMN `is_customer` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否开启门店客服1 是 0 否' AFTER `cashier_is_open_discount`,
- ADD COLUMN `customer_types` text NULL COMMENT '门店客服显示字段' AFTER `is_customer`;
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo $e->getMessage();die();
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240723160955AlterAddonsStoreSettings cannot be reverted.\n";
- return false;
- }
- }
|