Pārlūkot izejas kodu

修改字段类型

durong 5 gadi atpakaļ
vecāks
revīzija
acac00f5fd

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

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdatePhysicalStrengthToBehaviorTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('behavior', function (Blueprint $table) {
+            $table->integer('physical_strength')->default(0)->comment('行为消耗体力值')->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('behavior', function (Blueprint $table) {
+            //
+        });
+    }
+}