BlogMatch/database/migrations/2018_07_28_175045_create_Belong_table.php

37 lines
728 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBelongTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Belong', function(Blueprint $table)
{
$table->string('RID', 50)->comment('達人帳號');
$table->integer('CID')->index('CID')->comment('類別編號');
$table->date('startExclussiveDate')->nullable()->comment('排外起始時間');
$table->date('endExclussiveDate')->nullable()->comment('排外終止時間');
$table->primary(['RID','CID']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('Belong');
}
}