2015-12-08 04:46:46 +01:00
|
|
|
<?php
|
|
|
|
|
2022-11-25 21:29:04 +01:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2015-12-08 04:46:46 +01:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2016-01-23 21:42:25 +01:00
|
|
|
class AddServiceVaribles extends Migration
|
2015-12-08 04:46:46 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
2022-11-25 21:29:04 +01:00
|
|
|
public function up(): void
|
2015-12-08 04:46:46 +01:00
|
|
|
{
|
|
|
|
Schema::create('service_variables', function (Blueprint $table) {
|
2016-01-23 21:42:25 +01:00
|
|
|
$table->increments('id');
|
2015-12-08 04:46:46 +01:00
|
|
|
$table->mediumInteger('option_id')->unsigned();
|
|
|
|
$table->string('name');
|
|
|
|
$table->text('description');
|
|
|
|
$table->string('env_variable');
|
|
|
|
$table->string('default_value');
|
2016-01-23 21:42:25 +01:00
|
|
|
$table->tinyInteger('user_viewable')->unsigned();
|
|
|
|
$table->tinyInteger('user_editable')->unsigned();
|
|
|
|
$table->tinyInteger('required')->unsigned();
|
|
|
|
$table->string('regex')->nullable();
|
|
|
|
$table->timestamps();
|
2015-12-08 04:46:46 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
2022-11-25 21:29:04 +01:00
|
|
|
public function down(): void
|
2015-12-08 04:46:46 +01:00
|
|
|
{
|
2016-01-23 21:42:25 +01:00
|
|
|
Schema::dropIfExists('service_variables');
|
2015-12-08 04:46:46 +01:00
|
|
|
}
|
|
|
|
}
|