| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230915141326AlterQimallAddonsStoreFreightRules
- */
- class M230915141326AlterQimallAddonsStoreFreightRules extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try{
- $this->execute("ALTER TABLE `qimall_addons_store_freight_rules`
- ADD COLUMN `select_com` tinyint(2) NOT NULL DEFAULT 0 COMMENT '选择地区组件[0=多选地区,1=单选地区]' AFTER `updated_at`;");
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230915141326AlterQimallAddonsStoreFreightRules cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230915141326AlterQimallAddonsStoreFreightRules cannot be reverted.\n";
- return false;
- }
- */
- }
|