mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 00:52:43 +01:00
Add initial service functionality to DB
This commit is contained in:
parent
47235b670a
commit
f6da00dd1c
32
database/migrations/2015_12_08_023034_add_services_table.php
Normal file
32
database/migrations/2015_12_08_023034_add_services_table.php
Normal 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');
|
||||
}
|
||||
}
|
@ -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');
|
||||
}
|
||||
}
|
@ -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');
|
||||
}
|
||||
}
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user