| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230616023728AlterQimallAddonsStoreSettings
- */
- class M230616023728AlterQimallAddonsStoreSettings extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER table qimall_addons_store_settings add is_preferential_undertaking tinyint(1) not null DEFAULT 0 COMMENT '是否开启优惠谁承担独立设置,1:是;0:否';
- ALTER table qimall_addons_store_settings add preferential_undertaking tinyint(1) not null DEFAULT 1 COMMENT '优惠谁承担,1:平台;2:门店';";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230616023728AlterQimallAddonsStoreSettings cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230616023728AlterQimallAddonsStoreSettings cannot be reverted.\n";
- return false;
- }
- */
- }
|