Quellcode durchsuchen

修改迁移表字段数据类型

durong vor 5 Jahren
Ursprung
Commit
6a781919f3

+ 5 - 4
composer.json

@@ -8,16 +8,17 @@
         "php": ">=7.1.3",
         "cviebrock/laravel-elasticsearch": "^3.5",
         "dingo/api": "^2.2",
+        "doctrine/dbal": "^2.9",
         "guzzlehttp/guzzle": "^6.3",
         "hhxsv5/laravel-s": "~3.4.0",
+        "illuminate/redis": "^5.8",
         "laravel/lumen-framework": "5.8.*",
+        "league/csv": "^9.1",
         "multilinguals/apollo-client": "^0.1.2",
         "php-amqplib/php-amqplib": "^2.9",
-        "tymon/jwt-auth": "1.0.0-rc.4.1",
-        "vlucas/phpdotenv": "^3.3",
-        "illuminate/redis": "^5.8",
         "predis/predis": "^1.1",
-        "league/csv": "^9.1"
+        "tymon/jwt-auth": "1.0.0-rc.4.1",
+        "vlucas/phpdotenv": "^3.3"
     },
     "require-dev": {
         "fzaninotto/faker": "^1.4",

+ 32 - 0
database/migrations/2019_06_13_143624_update_behavior_action_id_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 UpdateBehaviorActionIdToBehaviorTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('behavior', function (Blueprint $table) {
+            $table->string('behavior_action_id')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('behavior', function (Blueprint $table) {
+            //
+        });
+    }
+}