osb/database/migrations/2017_06_18_104531_create_ab_asset_pool_table.php

37 lines
624 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbAssetPoolTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_asset_pool', function(Blueprint $table)
{
$table->integer('id')->nullable();
$table->integer('site_id')->nullable();
$table->string('name', 32)->nullable();
$table->unique(['site_id','id']);
$table->index(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_asset_pool');
}
}