Skip to content

Commit

Permalink
Merge pull request #4126 from Roardom/torrent-name-index
Browse files Browse the repository at this point in the history
(Update) Add indexes to torrents table
  • Loading branch information
HDVinnie authored Sep 1, 2024
2 parents 67f94d9 + 3b34151 commit ddd35b2
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author Roardom <[email protected]>
* @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');
});
}
};

0 comments on commit ddd35b2

Please sign in to comment.