36 lines
798 B
PHP
36 lines
798 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateSettingsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('settings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('display_name', 100);
|
|
$table->string('display_desc');
|
|
$table->string('name', 100)->unique('name');
|
|
$table->string('value');
|
|
$table->char('data_type', 10)->default('string');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('settings');
|
|
}
|
|
}
|