You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateSettingTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('setting', function (Blueprint $table) {
|
|
$table->unsignedInteger('id', true)->comment('고유번호');
|
|
$table->string('name', 100)->default('')->comment('변수명');
|
|
$table->string('key', 30)->default('')->comment('변수키');
|
|
$table->text('value')->comment('변수값');
|
|
$table->tinyInteger('system')->default(1)->comment('시스템변수[0:일반,1:시스템(키값 수정 및 삭제불가)]');
|
|
$table->unsignedInteger('created_id')->nullable()->comment('등록 회원번호');
|
|
$table->unsignedInteger('updated_id')->nullable()->comment('수정 회원번호');
|
|
$table->datetime('created_at')->nullable()->comment('등록일시');
|
|
$table->datetime('updated_at')->nullable()->comment('수정일시');
|
|
|
|
// 인덱스
|
|
$table->index('key', 'uk_tbl_setting_key');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('setting');
|
|
}
|
|
}
|