forked from kol/BlogMatch
更新遷移檔(migration)並新增自動產生的Model
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user