recover ptGen

This commit is contained in:
xiaomlove
2025-05-16 02:43:45 +07:00
parent 47f453335d
commit d123e8a849
19 changed files with 140 additions and 41 deletions

View File

@@ -7,11 +7,13 @@ use App\Models\ExamUser;
use App\Models\Language;
use App\Models\PersonalAccessToken;
use App\Models\Torrent;
use App\Models\TorrentExtra;
use App\Models\User;
use App\Repositories\ExamRepository;
use App\Repositories\SeedBoxRepository;
use App\Repositories\UploadRepository;
use Illuminate\Console\Command;
use Nexus\PTGen\PTGen;
use NexusPlugin\Menu\Filament\MenuItemResource\Pages\ManageMenuItems;
use NexusPlugin\Menu\MenuRepository;
use NexusPlugin\Menu\Models\MenuItem;
@@ -56,7 +58,7 @@ class Test extends Command
*/
public function handle()
{
Language::updateTransStatus();
}
}

View File

@@ -29,7 +29,7 @@ class MigrateTorrentsTableTextColumn extends Command
public function handle()
{
if (Schema::hasTable("torrent_extras") && Schema::hasColumn("torrents", "descr")) {
NexusDB::statement("insert into torrent_extras (torrent_id, descr, media_info, nfo, created_at) select id, descr, technical_info, nfo, now() from torrents on duplicate key update torrent_id = values(torrent_id)");
NexusDB::statement("insert into torrent_extras (torrent_id, descr, media_info, nfo, pt_gen, created_at) select id, descr, technical_info, nfo, pt_gen, now() from torrents on duplicate key update torrent_id = values(torrent_id)");
}
$columns = ["ori_descr", "descr", "nfo", "technical_info", "pt_gen"];
$sql = "alter table torrents ";