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