Fix that migration (closes #20)
This commit is contained in:
parent
ca1f928490
commit
028a39e11e
1 changed files with 31 additions and 0 deletions
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue