Browse Source

迁移文件修改

ajun 5 years ago
parent
commit
43fd80d6fb

+ 1 - 1
database/migrations/2020_01_02_172739_change_waybill_price_model_field.php

@@ -26,7 +26,7 @@ class ChangeWaybillPriceModelField extends Migration
     public function down()
     {
         Schema::table('waybill_price_models', function (Blueprint $table) {
-            $table->bigInteger('city_id')->index()->comment('外键城市')->change();
+//            $table->bigInteger('city_id')->index()->comment('外键城市')->change();
         });
     }
 }

+ 2 - 1
database/migrations/2020_04_09_111540_change_tutorial_table.php

@@ -32,7 +32,8 @@ class ChangeTutorialTable extends Migration
             $table->longText('content')->after('name')->nullable()->comment('富文本内容');
         });
         Schema::table('users', function (Blueprint $table) {
-            $table->string('email')->unique()->change();
+//            $table->unique('email','users_email_unique');
+//            $table->string('email')->unique()->change();
         });
     }
 }

+ 0 - 1
database/migrations/2020_06_02_130804_change_user_duty_check.php

@@ -26,7 +26,6 @@ class ChangeUserDutyCheck extends Migration
     public function down()
     {
         Schema::table('user_duty_checks', function (Blueprint $table) {
-            $table->dropColumn('workgroup_id');
         });
     }
 }

+ 4 - 4
database/migrations/2020_06_11_112028_change_rejected_bills_table.php

@@ -14,8 +14,8 @@ class ChangeRejectedBillsTable extends Migration
     public function up()
     {
         Schema::table('rejected_bills',function (Blueprint $table){
-            $table->index('is_loaded');
-            $table->index('is_checked');
+            $table->index('is_loaded','rejected_bills_is_loaded_index');
+            $table->index('is_checked','rejected_bills_is_checked_index');
         });
     }
 
@@ -28,8 +28,8 @@ class ChangeRejectedBillsTable extends Migration
     {
         //
         Schema::table('rejected_bills',function (Blueprint $table){
-            $table->dropIndex('is_loaded');
-            $table->dropIndex('is_checked');
+            $table->dropIndex('rejected_bills_is_loaded_index');
+            $table->dropIndex('rejected_bills_is_checked_index');
         });
     }
 }

+ 1 - 1
database/migrations/2020_06_16_173559_add_authorrities_waybillmanagement_freigt.php

@@ -31,7 +31,7 @@ class AddAuthorritiesWaybillmanagementFreigt extends Migration
     public function down()
     {
         foreach ($this->authNames as $name){
-            \App\Authority::where(['name'=>$name,'alias_name'=>$name])->destroy();
+            \App\Authority::where(['name'=>$name,'alias_name'=>$name])->delete();
         }
     }
 }

+ 0 - 1
database/migrations/2020_06_30_133655_change_processes_contents_column_type.php

@@ -26,7 +26,6 @@ class ChangeProcessesContentsColumnType extends Migration
     public function down()
     {
         Schema::table('processes_contents',function (Blueprint $table){
-            $table->dropColumn('type');
             $table->string('is_full',2)->default('N')->comment('是否成品');
         });
     }

+ 1 - 1
database/migrations/2020_09_10_143926_drop_shop_unique_name_index.php

@@ -27,7 +27,7 @@ class DropShopUniqueNameIndex extends Migration
     public function down()
     {
         Schema::table('shops', function (Blueprint $table) {
-            $table->string('name')->unique('shops_name_unique');
+            $table->string('name')->unique('shops_name_unique')->change();
         });
     }
 }

+ 1 - 1
database/migrations/2020_10_19_113042_create_logistic_timings_table.php

@@ -42,7 +42,7 @@ class CreateLogisticTimingsTable extends Migration
     {
         $create_array = [];
         $map = $this->getMap();
-        $logistic=Logistic::firstOrCreate(['name'=>'顺丰特惠']);
+        $logistic=Logistic::firstOrCreate(['name'=>'顺丰特惠','code'=>'SFTH']);
 //        $logistic = Logistic::query()->where('name','顺丰特惠')->first();
         $time = \Carbon\Carbon::now()->format('Y-m-d H:i:s');
         foreach ($map as $item) {

+ 3 - 1
database/migrations/2020_11_19_113955_change_order_issue_type_id_index.php

@@ -25,6 +25,8 @@ class ChangeOrderIssueTypeIdIndex extends Migration
      */
     public function down()
     {
-        Schema::dropIfExists('order_issues');
+        Schema::table('order_issues', function (Blueprint $table) {
+            $table->dropColumn('order_issue_type_id');
+        });
     }
 }