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

46 lines
1.1 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCheckoutTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_checkout', function(Blueprint $table)
{
$table->integer('id')->default(0);
$table->integer('site_id')->default(0)->index('fk_cko_set_idx');
$table->boolean('active')->nullable();
$table->string('name', 32)->nullable();
$table->string('description')->nullable();
$table->string('plugin', 32)->nullable();
$table->text('plugin_data')->nullable();
$table->string('graphic_url', 128)->nullable();
$table->float('amount_min', 10, 0)->nullable()->default(0);
$table->float('amount_max', 10, 0)->nullable();
$table->float('fee_fixed', 10, 0)->nullable();
$table->float('fee_variable', 10, 0)->nullable();
$table->boolean('fee_passon')->nullable();
$table->primary(['id','site_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_checkout');
}
}