torrents table last_action add index

This commit is contained in:
xiaomlove
2025-01-20 01:49:06 +08:00
parent d06d677565
commit a74a2c3c2a
4 changed files with 33 additions and 8 deletions

View File

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