| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250314082019AddRegion
- */
- class M250314082019AddRegion extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- INSERT INTO `qimall_region` (`name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`) VALUES ('大亚湾经济技术开发区',2025,3,'',0,0,'D','114.52193199999','22.715671999999');
- INSERT INTO `qimall_region` (`name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`) VALUES ('仲恺高新技术产业开发区',2025,3,'',0,0,'Z','114.29527199999','23.034215000000');
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250314082019AddRegion cannot be reverted.\n";
- return false;
- }
- }
|