Skip to content

Commit f6da00d

Browse files
committed
Add initial service functionality to DB
1 parent 47235b6 commit f6da00d

File tree

4 files changed

+137
-0
lines changed

4 files changed

+137
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class AddServicesTable extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('services', function (Blueprint $table) {
16+
$table->increments('id')->unsigned();
17+
$table->string('name');
18+
$table->text('description');
19+
$table->string('docker_image');
20+
});
21+
}
22+
23+
/**
24+
* Reverse the migrations.
25+
*
26+
* @return void
27+
*/
28+
public function down()
29+
{
30+
Schema::drop('services');
31+
}
32+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class AddServiceOptionsTable extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('service_options', function (Blueprint $table) {
16+
$table->increments('id')->unsigned();
17+
$table->mediumInteger('parent_service')->unsigned();
18+
$table->string('name');
19+
$table->text('description');
20+
$table->string('config_file');
21+
$table->binary('config_blob')->nullable();
22+
$table->string('docker_tag');
23+
});
24+
}
25+
26+
/**
27+
* Reverse the migrations.
28+
*
29+
* @return void
30+
*/
31+
public function down()
32+
{
33+
Schema::drop('service_options');
34+
}
35+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class AddServiceOptionVariables extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('service_variables', function (Blueprint $table) {
16+
$table->increments('id')->unsigned();
17+
$table->mediumInteger('option_id')->unsigned();
18+
$table->string('name');
19+
$table->text('description');
20+
$table->string('env_variable');
21+
$table->string('default_value');
22+
$table->boolean('user_viewable');
23+
$table->boolean('user_editable');
24+
$table->boolean('required');
25+
$table->string('regex');
26+
});
27+
}
28+
29+
/**
30+
* Reverse the migrations.
31+
*
32+
* @return void
33+
*/
34+
public function down()
35+
{
36+
Schema::drop('service_variables');
37+
}
38+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class AddServerVariables extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::create('server_variables', function (Blueprint $table) {
16+
$table->increments('id')->unsigned();
17+
$table->mediumInteger('server_id')->unsigned();
18+
$table->mediumInteger('variable_id')->unsigned();
19+
$table->string('variable_value');
20+
});
21+
}
22+
23+
/**
24+
* Reverse the migrations.
25+
*
26+
* @return void
27+
*/
28+
public function down()
29+
{
30+
Schema::drop('server_variables');
31+
}
32+
}

0 commit comments

Comments
 (0)