소스 검색

Merge pull request #3689 from pixelfed/staging

Add migration
daniel 2 년 전
부모
커밋
7e26113b59
1개의 변경된 파일33개의 추가작업 그리고 0개의 파일을 삭제
  1. 33 0
      database/migrations/2022_10_07_110644_add_item_id_and_item_type_indexes_to_notifications_table.php

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

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