Skip to content

Commit c2d630c

Browse files
committed
Fix migration
1 parent 5d990dc commit c2d630c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

database/migrations/2017_03_05_212803_DeleteServiceExecutableOption.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Pterodactyl\Models\ServiceOption;
34
use Illuminate\Support\Facades\Schema;
45
use Illuminate\Database\Schema\Blueprint;
56
use Illuminate\Database\Migrations\Migration;
@@ -14,12 +15,6 @@ class DeleteServiceExecutableOption extends Migration
1415
public function up()
1516
{
1617
DB::transaction(function () {
17-
Schema::table('services', function (Blueprint $table) {
18-
$table->renameColumn('file', 'folder');
19-
$table->text('description')->nullable()->change();
20-
$table->text('startup')->nullable()->change();
21-
});
22-
2318
// Attempt to fix any startup commands for servers
2419
// that we possibly can.
2520
foreach (ServiceOption::with('servers')->get() as $option) {
@@ -34,7 +29,10 @@ public function up()
3429
}
3530

3631
Schema::table('services', function (Blueprint $table) {
32+
$table->renameColumn('file', 'folder');
3733
$table->dropColumn('executable');
34+
$table->text('description')->nullable()->change();
35+
$table->text('startup')->nullable()->change();
3836
});
3937
});
4038
}

0 commit comments

Comments
 (0)