| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230207184414AddQimallFreightRules
- */
- class M230207184414AddQimallFreightRules extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="ALTER TABLE qimall_freight_rules add `select_com` tinyint(1) DEFAULT '0' COMMENT '选择地区组件[0=多选地区,1=单选地区]';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230207184414AddQimallFreightRules cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230117144314AddQimallFreeShippingRules cannot be reverted.\n";
- return false;
- }
- */
- }
|