| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230715173725InsertQimallRegion
- */
- class M230715173725InsertQimallRegion extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "INSERT INTO `qimall_region`(`id`,`name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`, `created_at`, `updated_at`) VALUES
- (10066, '沧浪区', 850, 3, '', 0, 0, 'C', '', '', NULL, NULL),
- (10067, '金阊区', 850, 3, '', 0, 0, 'J', '', '', NULL, NULL),
- (10068, '平江区', 850, 3, '', 0, 0, 'P', '', '', NULL, NULL),
- (10069, '苏州工业园区', 850, 3, '', 0, 0, 'S', '', '', NULL, NULL);";
- $sql.= "INSERT INTO `qimall_region`(`id`,`name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`, `created_at`, `updated_at`) VALUES
- (10070, '郑州高新技术产业开发区', 1507, 3, '', 0, 0, 'Z', '', '', NULL, NULL),
- (10071, '郑州经济技术开发区', 1507, 3, '', 0, 0, 'Z', '', '', NULL, NULL),
- (10072, '郑州航空港经济综合实验区', 1507, 3, '', 0, 0, 'Z', '', '', NULL, NULL),
- (10073, '郑东新区', 1507, 3, '', 0, 0, 'Z', '', '', NULL, NULL);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230715173725InsertQimallRegion cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230715173725InsertQimallRegion cannot be reverted.\n";
- return false;
- }
- */
- }
|