45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
||
|
class CreateAbServiceAdslTrafficTable extends Migration {
|
||
|
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('ab_service__adsl_traffic', function(Blueprint $table)
|
||
|
{
|
||
|
$table->integer('site_id')->default(0);
|
||
|
$table->date('date')->index('in_sat_DATE');
|
||
|
$table->string('service', 128)->index('in_sat_SERVICE');
|
||
|
$table->integer('supplier_id');
|
||
|
$table->integer('up_peak')->nullable();
|
||
|
$table->integer('up_offpeak')->nullable();
|
||
|
$table->integer('down_peak')->nullable();
|
||
|
$table->integer('down_offpeak')->nullable();
|
||
|
$table->integer('peer')->nullable();
|
||
|
$table->integer('internal')->nullable();
|
||
|
$table->time('time')->nullable();
|
||
|
$table->index(['service','date'], 'in_sat_SERVICE_DATE');
|
||
|
$table->index(['supplier_id','site_id'], 'fk_sat_as_idx');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::drop('ab_service__adsl_traffic');
|
||
|
}
|
||
|
|
||
|
}
|