소스 검색

Add migration

Daniel Supernault 2 년 전
부모
커밋
f32eabdf19
1개의 변경된 파일33개의 추가작업 그리고 0개의 파일을 삭제
  1. 33 0
      database/migrations/2022_01_08_103817_add_index_to_followers_table.php

+ 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) {
+            //
+        });
+    }
+}