MeiliSearch + Peers&Snatched table swip

This commit is contained in:
xiaomlove
2023-04-06 02:06:01 +08:00
parent c5cfd4acc7
commit 3dff8e457d
19 changed files with 785 additions and 77 deletions

View File

@@ -294,6 +294,7 @@ class Update extends Install
$torrentRep = new TorrentRepository();
$torrentRep->removeDuplicateSnatch();
$this->runMigrate('database/migrations/2023_03_29_021950_handle_snatched_user_torrent_unique.php');
$this->doLog("removeDuplicateSnatch and migrate 2023_03_29_021950_handle_snatched_user_torrent_unique");
}
}
@@ -493,7 +494,7 @@ class Update extends Install
$tableName = 'snatched';
$result = NexusDB::select('show index from ' . $tableName);
foreach ($result as $item) {
if (in_array($item->Column_name, ['torrentid', 'userid']) && $item->Non_unique == 0) {
if (in_array($item['Column_name'], ['torrentid', 'userid']) && $item['Non_unique'] == 0) {
return true;
}
}