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

42 lines
875 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCartTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_cart', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0);
$table->bigInteger('date_orig')->nullable();
$table->string('session_id', 32)->default('');
$table->integer('quantity')->nullable();
$table->integer('module_id')->default(0);
$table->integer('module_item')->default(0);
$table->text('module_data', 65535)->nullable();
$table->primary(['id','site_id']);
$table->index(['module_id','site_id'], 'fk_mod_crt_idx');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_cart');
}
}