Selaa lähdekoodia

Add migration

Daniel Supernault 2 vuotta sitten
vanhempi
commit
f32eabdf19

+ 33 - 0
database/migrations/2022_01_08_103817_add_index_to_followers_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddIndexToFollowersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('followers', function (Blueprint $table) {
+            $table->index('profile_id');
+            $table->index('following_id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('followers', function (Blueprint $table) {
+            //
+        });
+    }
+}