diff --git a/database/migrations/2024_07_02_082323_add_indexes_to_torrents_table.php b/database/migrations/2024_07_02_082323_add_indexes_to_torrents_table.php new file mode 100644 index 0000000000..202c3b1fd0 --- /dev/null +++ b/database/migrations/2024_07_02_082323_add_indexes_to_torrents_table.php @@ -0,0 +1,32 @@ + + * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 + */ + +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): void { + $table->index(['user_id', 'status', 'anon', 'deleted_at']); + $table->index('name'); + }); + } +};