duqinya 6 vuotta sitten
vanhempi
commit
3579e72eed

+ 5 - 5
database/migrations/2019_04_25_143155_add_bjcity_config_province_table.php

@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Database\Migrations\Migration;
 
-class AddBjcityConfigProvinceTable extends Migration
+class UpdateConfigPickupNodeTable extends Migration
 {
     /**
      * Run the migrations.
@@ -13,8 +13,8 @@ class AddBjcityConfigProvinceTable extends Migration
      */
     public function up()
     {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->renameColumn('id', 'bjcity_id',20)->comment('地区id');
+        Schema::table('config_pickup_node', function (Blueprint $table) {
+            $table->integer('distance')->comment('距离');
         });
     }
 
@@ -25,8 +25,8 @@ class AddBjcityConfigProvinceTable extends Migration
      */
     public function down()
     {
-        Schema::table('config_province', function (Blueprint $table) {
-            $table->dropColumn('bjcity_id');
+        Schema::table('config_pickup_node', function (Blueprint $table) {
+            $table->dropColumn(['distance']);
         });
     }
 }

+ 2 - 1
database/migrations/2019_04_25_120244_add_bjcity_id_config_province_table.php

@@ -15,6 +15,7 @@ class AddBjcityIdConfigProvinceTable extends Migration
     {
         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('城市中心点(即:经纬度坐标)');
@@ -29,7 +30,7 @@ class AddBjcityIdConfigProvinceTable extends Migration
     public function down()
     {
         Schema::table('config_province', function (Blueprint $table) {
-            $table->dropColumn('area_name','area_code','city_code','center');
+            $table->dropColumn('bjcity_id','area_name','area_code','city_code','center');
         });
     }
 }