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.
46 lines
1.7 KiB
PHP
46 lines
1.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateBoardTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('board', function (Blueprint $table) {
|
|
$table->unsignedInteger('id', true)->comment('게시판 번호');
|
|
$table->string('code', 20)->default('')->comment('게시판 코드');
|
|
$table->string('name', 50)->default('')->comment('게시판 이름');
|
|
$table->string('skin', 30)->default('default')->comment('게시판 스킨');
|
|
$table->enum('status', ['Enabled','Disabled'])->default('Enabled')->comment('사용여부');
|
|
$table->string('template', 20)->default('')->comment('타입');
|
|
$table->unsignedInteger('created_id')->nullable()->comment('등록 회원번호');
|
|
$table->unsignedInteger('updated_id')->nullable()->comment('수정 회원번호');
|
|
$table->unsignedInteger('deleted_id')->nullable()->comment('삭제 회원번호');
|
|
$table->datetime('created_at')->nullable()->comment('등록일시');
|
|
$table->datetime('updated_at')->nullable()->comment('수정일시');
|
|
$table->dateTime('deleted_at')->nullable()->comment('삭제일시');
|
|
|
|
// 인덱스
|
|
$table->unique('code', 'uk_tbl_board_code');
|
|
$table->index('created_at', 'ik_tbl_board_created_at');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('board');
|
|
}
|
|
}
|