43 lines
950 B
PHP
43 lines
950 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateAbAssetTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('ab_asset', function(Blueprint $table)
|
|
{
|
|
$table->bigInteger('id')->nullable();
|
|
$table->integer('site_id')->nullable();
|
|
$table->bigInteger('date_orig')->nullable();
|
|
$table->bigInteger('date_last')->nullable();
|
|
$table->boolean('active')->nullable();
|
|
$table->bigInteger('service_id')->nullable()->index('service');
|
|
$table->integer('pool_id')->nullable()->index('asso');
|
|
$table->string('asset', 128)->nullable()->index('asset');
|
|
$table->string('misc')->nullable();
|
|
$table->unique(['site_id','id'], 'IDS');
|
|
$table->index(['id','site_id'], 'assets');
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('ab_asset');
|
|
}
|
|
|
|
}
|