software-admin-panel-laravel/database/migrations/2022_11_17_002420_create_se...

36 lines
798 B
PHP
Raw Normal View History

2022-11-16 20:07:10 -06:00
<?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');
}
}