瀏覽代碼

Add migration for federation

Daniel Supernault 6 年之前
父節點
當前提交
3e9b75545d
共有 1 個文件被更改,包括 32 次插入0 次删除
  1. 32 0
      database/migrations/2018_10_25_030944_update_profile_table.php

+ 32 - 0
database/migrations/2018_10_25_030944_update_profile_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateProfileTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('profiles', function (Blueprint $table) {
+            $table->string('key_id')->nullable()->unique()->index()->after('outbox_url');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('profiles', function (Blueprint $table) {
+            $table->dropColumn('key_id');
+        });
+    }
+}