BlogMatch/database/migrations/2018_07_28_175045_create_Manage_table.php

44 lines
1.2 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateManageTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Manage', function(Blueprint $table)
{
$table->string('RID', 50)->comment('達人帳號');
$table->integer('AID')->index('AID')->comment('領域編號');
$table->string('URL', 1024)->comment('網址');
$table->date('createdDate')->comment('創立時間');
$table->integer('amountOfFans')->nullable()->default(0)->comment('粉絲數');
$table->integer('avgNumOfVisitorsPerDay')->nullable()->default(0)->comment('平均每日到訪人數');
$table->integer('numOfEntriesPerPage')->nullable()->default(0)->comment('單篇作品瀏覽數');
$table->integer('startOfCooperationFee')->comment('合作費用區間起始');
$table->integer('endOfCooperationFee')->comment('合作費用區間終止');
$table->date('startOfexecutionTime')->comment('執行時間起始');
$table->date('endOfexecutionTime')->comment('執行時間終止');
$table->primary(['RID','AID']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('Manage');
}
}