wzq 5 years ago
parent
commit
5e9b2835c7
1 changed files with 35 additions and 0 deletions
  1. 35 0
      database/migrations/2019_06_26_091019_add_video_id_to_table_post.php

+ 35 - 0
database/migrations/2019_06_26_091019_add_video_id_to_table_post.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddVideoIdToTablePost extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('post', function (Blueprint $table) {
+            $table->string('video_id', 32)
+                ->default('')
+                ->after('video')
+                ->comment('视频id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('post', function (Blueprint $table) {
+            //
+        });
+    }
+}