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

42 lines
992 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbProductTranslateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_product_translate', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('product_id')->default(0);
$table->integer('language_id')->default(0)->index('fk_pt_l_idx');
$table->string('name', 128)->nullable();
$table->text('description_short')->nullable();
$table->binary('description_full', 65535)->nullable();
$table->primary(['id','site_id','product_id','language_id']);
$table->unique(['product_id','language_id','site_id'], 'UNIQUE');
$table->index(['site_id','product_id'], 'fk_pt_p_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_product_translate');
}
}