xielin 6 år sedan
förälder
incheckning
950fc897ff

+ 6 - 2
database/migrations/2019_04_23_071015_create_table_config_province.php

@@ -14,11 +14,15 @@ class CreateTableConfigProvince extends Migration
     public function up()
     {
         Schema::create('config_province', function (Blueprint $table) {
-            $table->bigIncrements('id');
-            $table->string('name',30);  //名称
+            $table->bigIncrements('area_id');
+            $table->string('area_name',30);  //名称
             $table->integer('parent_id');//父级ID
             $table->integer('level');//级别
             $table->tinyInteger('sort');//排序
+            $table->string('area_code',50)->nullable()->comment('地区编码');
+            $table->string('city_code',50)->comment('城市编码');
+            $table->string('center',50)->comment('城市中心点(即:经纬度坐标)');
+            $table->integer('bjcity_id')->nullable()->comment('百度cityid');
             $table->timestamps();
         });
     }

+ 0 - 36
database/migrations/2019_04_25_143536_add_bjcity_id_config_province_table.php

@@ -1,36 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class AddBjcityIdConfigProvinceTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->renameColumn('name', 'area_name');
-            $table->renameColumn('id', 'bjcity_id',20)->comment('百度城市id');
-            $table->string('area_code',50)->nullable()->comment('地区编码');
-            $table->string('city_code',50)->comment('城市编码');
-            $table->string('center',50)->comment('城市中心点(即:经纬度坐标)');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->dropColumn('bjcity_id','area_name','area_code','city_code','center');
-        });
-    }
-}

+ 0 - 32
database/migrations/2019_04_26_085923_update_area_id_config_province_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class UpdateAreaIdConfigProvinceTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->renameColumn('bjcity_id', 'area_id');
-
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-        });
-    }
-}

+ 0 - 32
database/migrations/2019_04_26_090540_add_bjcity_id_config_province_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class AddBjcityIdConfigProvinceCityIdTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->integer('bjcity_id')->nullable();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            //
-        });
-    }
-}

+ 0 - 32
database/migrations/2019_04_30_095318_delete_city_code_to_config_province_table.php

@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class DeleteCityCodeToConfigProvinceTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->dropColumn('city_code');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('config_province', function (Blueprint $table) {
-            //
-        });
-    }
-}