Skip to content

Commit

Permalink
Add index for Nova sorting (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentBean authored Mar 18, 2022
1 parent 97ba454 commit 175975f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions database/migrations/2022_03_17_100000_add_index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::table('laravel_errors', function (Blueprint $table): void {
$table->index(['updated_at']);
});
}

public function down(): void
{
Schema::table('laravel_errors', function (Blueprint $table): void {
$table->dropIndex(['updated_at']);
});
}
};

0 comments on commit 175975f

Please sign in to comment.