41 lines
911 B
PHP
41 lines
911 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateAbHostServerAffiliateTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('ab_host_server_affiliate', function(Blueprint $table)
|
|
{
|
|
$table->bigInteger('id');
|
|
$table->integer('site_id');
|
|
$table->bigInteger('affiliate_id');
|
|
$table->integer('host_server_id');
|
|
$table->string('host_username', 45)->nullable();
|
|
$table->string('host_password', 45)->nullable();
|
|
$table->primary(['id','site_id','affiliate_id','host_server_id'],'pk_unique');
|
|
$table->index(['affiliate_id','site_id'], 'fk_hsa_aff_idx');
|
|
$table->index(['host_server_id','site_id'], 'fk_hsa_hs_idx');
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('ab_host_server_affiliate');
|
|
}
|
|
|
|
}
|