]> BookStack Code Mirror - bookstack/blob - database/migrations/2020_09_19_094251_add_activity_indexes.php
New translations editor.php (Welsh)
[bookstack] / database / migrations / 2020_09_19_094251_add_activity_indexes.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
6
7 class AddActivityIndexes extends Migration
8 {
9     /**
10      * Run the migrations.
11      *
12      * @return void
13      */
14     public function up()
15     {
16         Schema::table('activities', function (Blueprint $table) {
17             $table->index('key');
18             $table->index('created_at');
19         });
20     }
21
22     /**
23      * Reverse the migrations.
24      *
25      * @return void
26      */
27     public function down()
28     {
29         Schema::table('activities', function (Blueprint $table) {
30             $table->dropIndex('activities_key_index');
31             $table->dropIndex('activities_created_at_index');
32         });
33     }
34 }