1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00

Add initial service functionality to DB

This commit is contained in:
Dane Everitt 2015-12-07 22:46:46 -05:00
parent 47235b670a
commit f6da00dd1c
4 changed files with 137 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('services', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('name');
$table->text('description');
$table->string('docker_image');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('services');
}
}

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddServiceOptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('service_options', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->mediumInteger('parent_service')->unsigned();
$table->string('name');
$table->text('description');
$table->string('config_file');
$table->binary('config_blob')->nullable();
$table->string('docker_tag');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('service_options');
}
}

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddServiceOptionVariables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('service_variables', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->mediumInteger('option_id')->unsigned();
$table->string('name');
$table->text('description');
$table->string('env_variable');
$table->string('default_value');
$table->boolean('user_viewable');
$table->boolean('user_editable');
$table->boolean('required');
$table->string('regex');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('service_variables');
}
}

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddServerVariables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('server_variables', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->mediumInteger('server_id')->unsigned();
$table->mediumInteger('variable_id')->unsigned();
$table->string('variable_value');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('server_variables');
}
}