45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
||
|
class CreateAbExportDatamapTable extends Migration {
|
||
|
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('ab_export_datamap', function(Blueprint $table)
|
||
|
{
|
||
|
$table->bigInteger('id')->default(0);
|
||
|
$table->integer('site_id')->default(0);
|
||
|
$table->bigInteger('export_module_id')->default(0);
|
||
|
$table->bigInteger('date_orig')->nullable();
|
||
|
$table->bigInteger('date_last')->nullable();
|
||
|
$table->boolean('active')->nullable();
|
||
|
$table->bigInteger('item_id')->nullable();
|
||
|
$table->integer('module_id');
|
||
|
$table->binary('map_data', 65535)->nullable();
|
||
|
$table->primary(['id','site_id','export_module_id','module_id']);
|
||
|
$table->unique(['item_id','export_module_id','site_id'], 'UNIQUE');
|
||
|
$table->index(['export_module_id','site_id'], 'fk_edm_mod_idx');
|
||
|
$table->index(['module_id','site_id'], 'fk_edm_mod_idx1');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::drop('ab_export_datamap');
|
||
|
}
|
||
|
|
||
|
}
|