Hotfix for broken rc.1 installs and upgrades
This commit is contained in:
parent
a55220da39
commit
873ddd204d
4 changed files with 40 additions and 31 deletions
|
@ -4,8 +4,6 @@ use Illuminate\Support\Facades\Schema;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
use Pterodactyl\Models\ServiceOptions;
|
||||
|
||||
class RenameDoubleInsurgency extends Migration
|
||||
{
|
||||
/**
|
||||
|
@ -15,11 +13,13 @@ class RenameDoubleInsurgency extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
$model = ServiceOptions::where('parent_service', 2)->where('id', 3)->where('name', 'Insurgency')->first();
|
||||
if ($model) {
|
||||
$model->name = 'Team Fortress 2';
|
||||
$model->save();
|
||||
}
|
||||
DB::transaction(function () {
|
||||
$model = DB::table('service_options')->where('parent_service', 2)->where('id', 3)->where('name', 'Insurgency')->first();
|
||||
if ($model) {
|
||||
$model->name = 'Team Fortress 2';
|
||||
$model->save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue