osb/database/migrations/2017_06_18_104531_create_ab_host_server_affiliate_table.php
2018-06-18 21:18:34 +10:00

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');
}
}