문의하기: 연락처/지역/첨부파일 누락파일 추가
parent
4a560e49e3
commit
f37da33b0a
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSmsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sms', function (Blueprint $table) {
|
||||
$table->unsignedInteger('id', true)->comment('전송번호');
|
||||
$table->string('title', 255)->comment('제목');
|
||||
$table->text('content', 65535)->comment('내용');
|
||||
$table->string('callback', 20)->comment('회신번호');
|
||||
$table->integer('total')->default(0)->comment('전송건수');
|
||||
$table->integer('success')->default(0)->comment('성공건수');
|
||||
$table->integer('failure')->default(0)->comment('실패건수');
|
||||
$table->datetime('created_at')->nullable()->comment('등록일시');
|
||||
$table->datetime('updated_at')->nullable()->comment('수정일시');
|
||||
$table->dateTime('deleted_at')->nullable()->comment('삭제일시');
|
||||
|
||||
// 인덱스
|
||||
$table->index('created_at', 'ik_tbl_sms_created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('sms');
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSmsDetailTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sms_detail', function (Blueprint $table) {
|
||||
$table->unsignedInteger('id', true)->comment('상세번호');
|
||||
$table->unsignedInteger('sms_id')->comment('전송번호');
|
||||
$table->string('phone', 50)->default('발신번호');
|
||||
$table->integer('success')->default(0)->comment('성공여부');
|
||||
$table->string('error', 255)->nullable()->comment('에러내용');
|
||||
$table->datetime('created_at')->nullable()->comment('등록일시');
|
||||
$table->datetime('updated_at')->nullable()->comment('수정일시');
|
||||
$table->dateTime('deleted_at')->nullable()->comment('삭제일시');
|
||||
|
||||
$table->index('created_at', 'ik_tbl_sms_detail_created_at');
|
||||
|
||||
// 외래키
|
||||
$table->foreign('sms_id', 'fk_tbl_sms_detail_sms_id')
|
||||
->references('id')->on('sms')
|
||||
->onUpdate('cascade')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('sms_detail');
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddZoneToBoardArticleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('board_article', function (Blueprint $table) {
|
||||
$table->string('zone')->nullable()->comment('지역')->after('related_link');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('board_article', function (Blueprint $table) {
|
||||
$table->dropColumn('zone');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue