| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M231208061620InsertQimallRegion
- */
- class M231208061620InsertQimallRegion extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "INSERT INTO `qimall_region` (`id`, `name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`, `created_at`, `updated_at`) VALUES (10288, '高新技术开发区', 1728, 3, '', 0, 0, 'Y', '112.128537', '32.014797', NULL, NULL);";
- $this->execute($sql);
- $sql = "INSERT INTO `qimall_region` (`id`, `name`, `parent_id`, `level`, `short_title`, `areacode`, `zipcode`, `initial`, `lng`, `lat`, `created_at`, `updated_at`) VALUES (10289, '东津新区', 1728, 3, '', 0, 0, 'Y', '112.233161', '32.056027', NULL, NULL);";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M231208061620InsertQimallRegion cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M231208061620InsertQimallRegion cannot be reverted.\n";
- return false;
- }
- */
- }
|