BlogMatch/database/migrations/2018_07_26_113627_create_Manage_table.php
2018-07-26 19:38:40 +08:00

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);
$table->integer('A_ID')->index('A_ID');
$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','A_ID']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('Manage');
}
}