Hotfix for broken rc.1 installs and upgrades

This commit is contained in:
Dane Everitt 2016-10-31 17:15:30 -04:00
parent a55220da39
commit 873ddd204d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 40 additions and 31 deletions

View file

@ -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();
}
});
}
/**