| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace addons\StarChain\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241224145036AddStarRegion
- */
- class M241224145036AddStarRegion extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- // 插入表数据
- $sql = <<<SQL
- INSERT INTO `qimall_addons_star_chain_region`(`region_id`, `name`, `city_code`, `region_code`, `parent_code`, `parent_name`, `region_full_name`, `region_full_codes`, `longitude`, `latitude`, `initial`, `region_level`) VALUES ('1526138588059811847', '临平区', '0571', '330113', '330100', '杭州市', '临平区,杭州市,浙江省', '330113,330100,330000', '119.715101', '30.231153', 'L', 3);
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241224145036AddStarRegion cannot be reverted.\n";
- return false;
- }
- }
|