This breaks literally the entire panel.

This commit is contained in:
Dane Everitt 2017-10-06 23:57:53 -05:00
parent 344c1a9885
commit df87ea0867
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
88 changed files with 1205 additions and 992 deletions

View file

@ -6,8 +6,6 @@
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
use Pterodactyl\Models\Service;
use Pterodactyl\Models\ServiceOption;
use Illuminate\Database\Migrations\Migration;
class MigrateToNewServiceSystem extends Migration
@ -18,12 +16,12 @@ class MigrateToNewServiceSystem extends Migration
public function up()
{
DB::transaction(function () {
$service = Service::where('author', config('pterodactyl.service.core'))->where('folder', 'srcds')->first();
$service = DB::table('services')->where('author', config('pterodactyl.service.core'))->where('folder', 'srcds')->first();
if (! $service) {
return;
}
$options = ServiceOption::where('service_id', $service->id)->get();
$options = DB::table('service_options')->where('service_id', $service->id)->get();
$options->each(function ($item) use ($options) {
if ($item->tag === 'srcds' && $item->name === 'Insurgency') {
$item->tag = 'insurgency';