wzq vor 5 Jahren
Ursprung
Commit
406d900afb
1 geänderte Dateien mit 59 neuen und 0 gelöschten Zeilen
  1. 59 0
      database/migrations/2019_06_14_155026_create_table_feed.php

+ 59 - 0
database/migrations/2019_06_14_155026_create_table_feed.php

@@ -0,0 +1,59 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateTableFeed extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('feed', function (Blueprint $table) {
+            $table->bigIncrements('id');
+
+            $table->integer('uid')
+                ->index('uid')
+                ->comment('uid');
+
+            $table->integer('follow_uid')
+                ->comment('关注人uid');
+
+            $table->string('follow_username')
+                ->default('')
+                ->comment('关注人昵称');
+
+            $table->string('follow_avatar')
+                ->default('')
+                ->comment('关注人头像');
+
+            $table->string('type', 32)
+                ->default('post_create')
+                ->comment('类型');
+
+            $table->integer('relate_id')
+                ->default(0)
+                ->comment('相关id');
+
+            $table->string('content', 200)
+                ->default('')
+                ->comment('内容');
+
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('feed');
+    }
+}