| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240821102210QimallAddonsStoreFieldStreetCommunitys
- */
- class M240821102210QimallAddonsStoreFieldStreetCommunitys extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("ALTER TABLE `qimall_addons_store`
- ADD COLUMN `street_id` INT(11) NOT NULL DEFAULT '0' comment '街道id';");
- $this->execute("ALTER TABLE `qimall_addons_store`
- ADD COLUMN `community_id` INT(11) NOT NULL DEFAULT '0' comment '社区id';");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240821102210QimallAddonsStoreFieldStreetCommunity cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220906032539QimallAddonsStoreCouponReward cannot be reverted.\n";
- return false;
- }
- */
- }
|