Improved server creation and options

This commit is contained in:
Dane Everitt 2016-01-01 22:53:43 -05:00
parent 8b8ef4f2d6
commit 6b25a163fc
6 changed files with 168 additions and 14 deletions

View file

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddNewServerOptions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('servers', function (Blueprint $table) {
$table->boolean('oom_disabled')->default(false)->after('cpu');
$table->mediumInteger('swap')->default(0)->after('memory');
$table->text('startup')->after('option');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('oom_enabled');
$table->dropColumn('swap');
$table->dropColumn('startup');
});
}
}

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ModifyServiceOptions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropColumn('config_file');
$table->dropColumn('config_blob');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('service_options', function (Blueprint $table) {
$table->string('config_file')->after('description');
$table->binary('config_blob')->after('config_file');
});
}
}

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ModifyServicesAddStartup extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('services', function (Blueprint $table) {
$table->text('executable')->after('description');
$table->text('startup')->after('executable');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('services', function (Blueprint $table) {
$table->dropColumn('executable');
$table->dropColumn('startup');
});
}
}