forked from kol/BlogMatch
Initial Commit
This commit is contained in:
35
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
35
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2018_07_22_192734_create_Area_table.php
Normal file
33
database/migrations/2018_07_22_192734_create_Area_table.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateAreaTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Area', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('A_ID', true);
|
||||
$table->string('name', 50)->comment('領域名稱');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Area');
|
||||
}
|
||||
|
||||
}
|
||||
34
database/migrations/2018_07_22_192734_create_Bank_table.php
Normal file
34
database/migrations/2018_07_22_192734_create_Bank_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBankTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Bank', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('ID', true);
|
||||
$table->string('BankNum', 3);
|
||||
$table->string('BankName', 10);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Bank');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBeClassifiedAsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('BeClassifiedAs', function(Blueprint $table)
|
||||
{
|
||||
$table->string('CBID', 50)->comment('廠商帳號');
|
||||
$table->integer('CID')->index('CID')->comment('分類ID');
|
||||
$table->primary(['CBID','CID']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('BeClassifiedAs');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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);
|
||||
$table->integer('C_ID')->index('C_ID');
|
||||
$table->date('startExclussiveDate')->nullable()->comment('排外起始時間');
|
||||
$table->date('endExclussiveDate')->nullable()->comment('排外終止時間');
|
||||
$table->primary(['RID','C_ID']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Belong');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateCaseBuilderTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('CaseBuilder', function(Blueprint $table)
|
||||
{
|
||||
$table->string('CBID', 50)->primary()->comment('帳號');
|
||||
$table->string('password', 50)->comment('密碼');
|
||||
$table->string('companyName', 50)->comment('公司行號');
|
||||
$table->string('companyPhone', 20)->comment('公司電話');
|
||||
$table->string('companyAddress', 50)->comment('公司地址');
|
||||
$table->string('uniformNumber', 10)->comment('統一編號');
|
||||
$table->string('contact', 50)->comment('聯絡人');
|
||||
$table->string('contactNumber', 20)->comment('聯絡人電話');
|
||||
$table->string('contactEmail', 50)->comment('聯絡人E-mail');
|
||||
$table->string('isProxy', 30)->comment('代理/自營');
|
||||
$table->string('frequency', 30)->comment('發案頻率');
|
||||
$table->string('payment', 30)->comment('付款方式');
|
||||
$table->date('startServiceDate')->nullable()->comment('服務起始日期');
|
||||
$table->date('endServiceDate')->nullable()->comment('服務終止日期');
|
||||
$table->integer('verifyStatus')->nullable()->default(0)->comment('審核狀態');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('CaseBuilder');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateChooseTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Choose', function(Blueprint $table)
|
||||
{
|
||||
$table->string('RID', 50)->comment('達人帳號');
|
||||
$table->string('TCID', 50)->index('TCID')->comment('案件編號');
|
||||
$table->primary(['RID','TCID']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Choose');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateCommissionedTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Commissioned', function(Blueprint $table)
|
||||
{
|
||||
$table->string('ID', 50)->primary()->comment('委託編號');
|
||||
$table->string('TCID', 50)->index('TCID')->comment('案件編號');
|
||||
$table->string('RID', 50)->index('RID')->comment('達人編號');
|
||||
$table->date('commissionedDate')->comment('委託日期');
|
||||
$table->text('pointOfArtical', 65535)->comment('撰文要點');
|
||||
$table->string('amountOfwords', 50)->comment('字數要求');
|
||||
$table->string('numOfImgesRequired', 50)->comment('圖片數要求');
|
||||
$table->integer('FlightNegotiationStatus')->nullable()->default(0)->comment('檔期協商狀態');
|
||||
$table->integer('PriceNegotiationStatus')->nullable()->default(0)->comment('價格協商狀態');
|
||||
$table->integer('caseExecutionStatus')->nullable()->default(0)->comment('案件執行狀態');
|
||||
$table->text('commentOfReceiver', 65535)->nullable()->comment('對達人之評價');
|
||||
$table->text('commentOfCaseBuilder', 65535)->nullable()->comment('對品牌/代理商之評價');
|
||||
$table->string('reasonOfTerminate', 50)->nullable()->comment('終止原因');
|
||||
$table->date('terminationDate')->nullable()->comment('終止時間');
|
||||
$table->date('PaymentTime')->nullable()->comment('付款時間');
|
||||
$table->string('paymentMethod', 10)->nullable()->comment('付款方式');
|
||||
$table->string('bankName', 50)->nullable()->comment('付款銀行');
|
||||
$table->integer('amountOfPay')->nullable()->default(0)->comment('付款金額');
|
||||
$table->string('AccuountNumber', 30)->nullable()->comment('付款人帳號');
|
||||
$table->string('MailID', 20)->nullable()->comment('郵件編號');
|
||||
$table->integer('caseDifficulty')->nullable()->default(0)->comment('案件難易度');
|
||||
$table->integer('receiverRating')->nullable()->default(0)->comment('達人評等');
|
||||
$table->integer('casebuilderRating')->nullable()->default(0)->comment('品牌/代理商評等');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Commissioned');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateFlightNegotiationTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('FlightNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->string('ID', 50)->comment('委託編號');
|
||||
$table->dateTime('negotiationDate')->comment('協商日期');
|
||||
$table->string('negotiator', 50)->comment('協商者');
|
||||
$table->date('deliveryDate')->comment('交稿日期');
|
||||
$table->date('publishDate')->comment('發佈日期');
|
||||
$table->text('description', 65535)->nullable()->comment('協商說明');
|
||||
$table->primary(['ID','negotiationDate']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('FlightNegotiation');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
$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');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePreferenceTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Preference', function(Blueprint $table)
|
||||
{
|
||||
$table->string('CBID', 50)->comment('品牌/代理商帳號');
|
||||
$table->string('RID', 50)->index('RID')->comment('達人帳號');
|
||||
$table->text('description', 65535)->nullable()->comment('說明');
|
||||
$table->primary(['CBID','RID']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Preference');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePriceNegotiationTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('PriceNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->string('ID', 50)->comment('委託編號');
|
||||
$table->dateTime('negotiationDate')->comment('議價日期');
|
||||
$table->string('negotiator', 50)->comment('議價者');
|
||||
$table->string('itemName', 50)->nullable()->comment('物品名稱');
|
||||
$table->integer('itemValue')->nullable()->comment('物品價值');
|
||||
$table->integer('price')->nullable()->comment('議價金額');
|
||||
$table->text('description', 65535)->nullable()->comment('議價說明');
|
||||
$table->primary(['ID','negotiationDate']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('PriceNegotiation');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateProofReadingTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('ProofReading', function(Blueprint $table)
|
||||
{
|
||||
$table->string('ID', 50)->comment('委託編號');
|
||||
$table->dateTime('deliveryDate')->comment('交稿日期');
|
||||
$table->string('manuscriptUrl', 50)->nullable()->comment('稿件網址');
|
||||
$table->text('suggestions', 65535)->nullable()->comment('校稿意見');
|
||||
$table->dateTime('replyTime')->nullable()->comment('意見回覆時間');
|
||||
$table->text('description', 65535)->nullable()->comment('交稿者說明');
|
||||
$table->primary(['ID','deliveryDate']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ProofReading');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateReceiverTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Receiver', function(Blueprint $table)
|
||||
{
|
||||
$table->string('RID', 50)->primary()->comment('帳號');
|
||||
$table->string('password', 50)->comment('密碼');
|
||||
$table->string('name', 100)->comment('姓名');
|
||||
$table->string('nickName', 100)->comment('暱稱');
|
||||
$table->string('phone', 15)->comment('電話');
|
||||
$table->string('email', 300)->comment('E-mail');
|
||||
$table->string('address', 100)->comment('地址');
|
||||
$table->text('indroduction', 65535)->comment('簡介');
|
||||
$table->string('photoPath', 30)->nullable()->comment('頭像路徑');
|
||||
$table->string('bankName', 50)->comment('匯款銀行(含銀行代碼)');
|
||||
$table->string('bankID', 30)->comment('銀行帳號');
|
||||
$table->boolean('verifyStatus')->nullable()->default(0)->comment('審核狀態');
|
||||
$table->string('bankLocation', 30)->comment('銀行分行名稱');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('Receiver');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateReleaseManuscriptTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('ReleaseManuscript', function(Blueprint $table)
|
||||
{
|
||||
$table->string('ID', 50)->comment('委託編號');
|
||||
$table->date('releaseDate')->comment('發稿日期');
|
||||
$table->string('manuscriptUrl', 50)->nullable()->comment('稿件網址');
|
||||
$table->text('suggestions', 65535)->nullable()->comment('校稿意見');
|
||||
$table->dateTime('replyTime')->nullable()->comment('意見回覆時間');
|
||||
$table->text('description', 65535)->nullable()->comment('交稿者說明');
|
||||
$table->primary(['ID','releaseDate']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ReleaseManuscript');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTheCaseTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('TheCase', function(Blueprint $table)
|
||||
{
|
||||
$table->string('TCID', 50)->comment('案件編號');
|
||||
$table->string('CBID', 50)->index('CBID')->comment('品牌/代理商帳號');
|
||||
$table->string('name', 50)->comment('案件名稱');
|
||||
$table->string('class', 30)->comment('案件類別');
|
||||
$table->text('description', 65535)->nullable()->comment('商品描述');
|
||||
$table->integer('specialPrice')->comment('商品優惠價');
|
||||
$table->integer('price')->comment('商品市售價');
|
||||
$table->text('howToBuy', 65535)->comment('如何購買');
|
||||
$table->date('releaseDate')->comment('發佈日期');
|
||||
$table->primary(['TCID','CBID']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('TheCase');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTheClassTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('TheClass', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('CID', true);
|
||||
$table->string('name', 50)->comment('類別名稱');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('TheClass');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToBeClassifiedAsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('BeClassifiedAs', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('CID', 'beclassifiedas_ibfk_1')->references('C_ID')->on('theclass')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('CBID', 'beclassifiedas_ibfk_2')->references('CBID')->on('casebuilder')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('BeClassifiedAs', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('beclassifiedas_ibfk_1');
|
||||
$table->dropForeign('beclassifiedas_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToBelongTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Belong', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('C_ID', 'belong_ibfk_1')->references('C_ID')->on('theclass')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('RID', 'belong_ibfk_2')->references('RID')->on('receiver')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('Belong', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('belong_ibfk_1');
|
||||
$table->dropForeign('belong_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToChooseTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Choose', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('RID', 'choose_ibfk_1')->references('RID')->on('receiver')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
$table->foreign('TCID', 'choose_ibfk_2')->references('TCID')->on('thecase')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('Choose', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('choose_ibfk_1');
|
||||
$table->dropForeign('choose_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToCommissionedTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Commissioned', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('TCID', 'commissioned_ibfk_1')->references('TCID')->on('thecase')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
$table->foreign('RID', 'commissioned_ibfk_2')->references('RID')->on('receiver')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('Commissioned', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('commissioned_ibfk_1');
|
||||
$table->dropForeign('commissioned_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToFlightNegotiationTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('FlightNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('ID', 'flightnegotiation_ibfk_1')->references('ID')->on('commissioned')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('FlightNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('flightnegotiation_ibfk_1');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToManageTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Manage', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('A_ID', 'manage_ibfk_1')->references('A_ID')->on('area')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('RID', 'manage_ibfk_2')->references('RID')->on('receiver')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('Manage', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('manage_ibfk_1');
|
||||
$table->dropForeign('manage_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToPreferenceTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('Preference', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('CBID', 'preference_ibfk_1')->references('CBID')->on('casebuilder')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
$table->foreign('RID', 'preference_ibfk_2')->references('RID')->on('receiver')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('Preference', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('preference_ibfk_1');
|
||||
$table->dropForeign('preference_ibfk_2');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToPriceNegotiationTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('PriceNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('ID', 'pricenegotiation_ibfk_1')->references('ID')->on('commissioned')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('PriceNegotiation', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('pricenegotiation_ibfk_1');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToProofReadingTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ProofReading', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('ID', 'proofreading_ibfk_1')->references('ID')->on('commissioned')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ProofReading', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('proofreading_ibfk_1');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToReleaseManuscriptTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ReleaseManuscript', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('ID', 'releasemanuscript_ibfk_1')->references('ID')->on('commissioned')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ReleaseManuscript', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('releasemanuscript_ibfk_1');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToTheCaseTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('TheCase', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('CBID', 'thecase_ibfk_1')->references('CBID')->on('casebuilder')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('TheCase', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('thecase_ibfk_1');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
37
database/migrations/2018_07_22_193326_create_admin_table.php
Normal file
37
database/migrations/2018_07_22_193326_create_admin_table.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAdminTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('Admin', function (Blueprint $table) {
|
||||
$table->string('ID');
|
||||
$table->string('password');
|
||||
$table->string('name');
|
||||
$table->string('nick_name');
|
||||
$table->string('email');
|
||||
$table->string('phone_number');
|
||||
$table->timestamps();
|
||||
$table->primary('ID');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('admin');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user