|
|
@@ -0,0 +1,34 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+
|
|
|
+class ChangeCarTypesAddLengthColumn extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ Schema::table('car_types', function (Blueprint $table) {
|
|
|
+ $table->string('length')->comment('车长(米)')->change();
|
|
|
+ $table->string('load')->nullable()->comment('载重(吨)')->change();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Schema::table('car_types', function (Blueprint $table) {
|
|
|
+ $table->decimal('length')->comment('车长(米)')->change();
|
|
|
+ $table->decimal('load')->nullable()->comment('载重(吨)')->change();
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|