peers add index torrent_peer

This commit is contained in:
xiaomlove
2022-11-14 16:14:19 +08:00
parent 463c4ecf96
commit 81c3b4fa24

View File

@@ -36,7 +36,7 @@ class CreatePeersTable extends Migration
$table->unsignedBigInteger('downloadoffset')->default(0);
$table->unsignedBigInteger('uploadoffset')->default(0);
$table->char('passkey', 32)->default('');
$table->index(['torrent', 'peer_id']);
$table->unique(['torrent', 'peer_id']);
});
}