From f6da00dd1c0e0313fa60ddb11b5c3e111b372612 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Mon, 7 Dec 2015 22:46:46 -0500 Subject: [PATCH] Add initial service functionality to DB --- .../2015_12_08_023034_add_services_table.php | 32 ++++++++++++++++ ...12_08_024433_add_service_options_table.php | 35 +++++++++++++++++ ...08_030037_add_service_option_variables.php | 38 +++++++++++++++++++ ...2015_12_08_030810_add_server_variables.php | 32 ++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 database/migrations/2015_12_08_023034_add_services_table.php create mode 100644 database/migrations/2015_12_08_024433_add_service_options_table.php create mode 100644 database/migrations/2015_12_08_030037_add_service_option_variables.php create mode 100644 database/migrations/2015_12_08_030810_add_server_variables.php diff --git a/database/migrations/2015_12_08_023034_add_services_table.php b/database/migrations/2015_12_08_023034_add_services_table.php new file mode 100644 index 000000000..a3d9582af --- /dev/null +++ b/database/migrations/2015_12_08_023034_add_services_table.php @@ -0,0 +1,32 @@ +increments('id')->unsigned(); + $table->string('name'); + $table->text('description'); + $table->string('docker_image'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('services'); + } +} diff --git a/database/migrations/2015_12_08_024433_add_service_options_table.php b/database/migrations/2015_12_08_024433_add_service_options_table.php new file mode 100644 index 000000000..0b967594b --- /dev/null +++ b/database/migrations/2015_12_08_024433_add_service_options_table.php @@ -0,0 +1,35 @@ +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'); + } +} diff --git a/database/migrations/2015_12_08_030037_add_service_option_variables.php b/database/migrations/2015_12_08_030037_add_service_option_variables.php new file mode 100644 index 000000000..3791ca32e --- /dev/null +++ b/database/migrations/2015_12_08_030037_add_service_option_variables.php @@ -0,0 +1,38 @@ +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'); + } +} diff --git a/database/migrations/2015_12_08_030810_add_server_variables.php b/database/migrations/2015_12_08_030810_add_server_variables.php new file mode 100644 index 000000000..ae430e9fb --- /dev/null +++ b/database/migrations/2015_12_08_030810_add_server_variables.php @@ -0,0 +1,32 @@ +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'); + } +}