| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace addons\Area\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240123121412AreaCommunityAddFieldParentIsDistrict
- */
- class M240123121412AreaCommunityAddFieldParentIsDistrict extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("ALTER TABLE `qimall_addons_area_community` ADD COLUMN `parent_is_district` TINYINT NOT NULL DEFAULT 0 COMMENT '上级是否为区级' AFTER `area`;");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240123121412AreaCommunityAddFieldParentIsDistrict cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240123121412AreaCommunityAddFieldParentIsDistrict cannot be reverted.\n";
- return false;
- }
- */
- }
|