| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230426075842RegionTownByShenZhen
- */
- class M230426075842RegionTownByShenZhen extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='南头街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26298;
- UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='南山街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26299;
- UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='沙河街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26300;
- UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='蛇口街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26301;
- UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='招商街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26302;
- UPDATE `qimall_town` SET `district_id`=1968, `adcode`=230404, `name`='粤海街道', `created_at`=1594556772, `updated_at`=1594556772 WHERE `id`=26303;
- ");
- $this->execute("INSERT INTO `qimall_town` (`district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES (1968, 230404, '桃源街道', 1594556772, 1594556772);");
- $this->execute("INSERT INTO `qimall_town` (`district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES (1968, 230404, '西丽街道', 1594556772, 1594556772);");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230426075842RegionTownByShenZhen cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230426075842RegionTownByShenZhen cannot be reverted.\n";
- return false;
- }
- */
- }
|