mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Fix migration
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Pterodactyl\Models\ServiceOption;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
@@ -14,12 +15,6 @@ class DeleteServiceExecutableOption extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
DB::transaction(function () {
|
DB::transaction(function () {
|
||||||
Schema::table('services', function (Blueprint $table) {
|
|
||||||
$table->renameColumn('file', 'folder');
|
|
||||||
$table->text('description')->nullable()->change();
|
|
||||||
$table->text('startup')->nullable()->change();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Attempt to fix any startup commands for servers
|
// Attempt to fix any startup commands for servers
|
||||||
// that we possibly can.
|
// that we possibly can.
|
||||||
foreach (ServiceOption::with('servers')->get() as $option) {
|
foreach (ServiceOption::with('servers')->get() as $option) {
|
||||||
@@ -34,7 +29,10 @@ class DeleteServiceExecutableOption extends Migration
|
|||||||
}
|
}
|
||||||
|
|
||||||
Schema::table('services', function (Blueprint $table) {
|
Schema::table('services', function (Blueprint $table) {
|
||||||
|
$table->renameColumn('file', 'folder');
|
||||||
$table->dropColumn('executable');
|
$table->dropColumn('executable');
|
||||||
|
$table->text('description')->nullable()->change();
|
||||||
|
$table->text('startup')->nullable()->change();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user