| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240925100736ModifyTownForDistrictId1885
- */
- class M240925100736ModifyTownForDistrictId1885 extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- DELETE FROM `qimall_town` WHERE `district_id` = '1885';
- INSERT INTO `qimall_town` (`district_id`, `adcode`, `name`, `created_at`, `updated_at`) VALUES
- (1885, 430921, '乌嘴乡', 1727230159, 1727230159),
- (1885, 430921, '中鱼口镇', 1727230159, 1727230159),
- (1885, 430921, '浪拔湖镇', 1727230159, 1727230159),
- (1885, 430921, '麻河口镇', 1727230159, 1727230159),
- (1885, 430921, '三仙湖镇', 1727230159, 1727230159),
- (1885, 430921, '茅草街镇', 1727230159, 1727230159),
- (1885, 430921, '华阁镇', 1727230159, 1727230159),
- (1885, 430921, '南洲镇', 1727230159, 1727230159),
- (1885, 430921, '武圣宫镇', 1727230159, 1727230159),
- (1885, 430921, '厂窖镇', 1727230159, 1727230159),
- (1885, 430921, '青树嘴镇', 1727230159, 1727230159),
- (1885, 430921, '明山头镇', 1727230159, 1727230159);
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240925100736ModifyTownForDistrictId1885 cannot be reverted.\n";
- return false;
- }
- }
|