Skip to content

Commit 028a39e

Browse files
committed
Fix that migration (closes pterodactyl#20)
1 parent ca1f928 commit 028a39e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class FixNodeSchemeField extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::table('nodes', function (Blueprint $table) {
16+
DB::statement('ALTER TABLE `nodes` MODIFY `scheme` VARCHAR(5) DEFAULT \'https\' NOT NULL');
17+
});
18+
}
19+
20+
/**
21+
* Reverse the migrations.
22+
*
23+
* @return void
24+
*/
25+
public function down()
26+
{
27+
Schema::table('nodes', function (Blueprint $table) {
28+
DB::statement('ALTER TABLE `nodes` MODIFY `scheme` BOOLEAN() DEFAULT 0 NOT NULL');
29+
});
30+
}
31+
}

0 commit comments

Comments
 (0)