Fix that migration (closes #20)

This commit is contained in:
Dane Everitt 2016-01-11 22:52:47 -05:00
parent ca1f928490
commit 028a39e11e

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class FixNodeSchemeField extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('nodes', function (Blueprint $table) {
DB::statement('ALTER TABLE `nodes` MODIFY `scheme` VARCHAR(5) DEFAULT \'https\' NOT NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('nodes', function (Blueprint $table) {
DB::statement('ALTER TABLE `nodes` MODIFY `scheme` BOOLEAN() DEFAULT 0 NOT NULL');
});
}
}