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

45 lines
1.0 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbTaxTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_tax', function(Blueprint $table)
{
$table->integer('id')->default(0)->primary();
$table->bigInteger('date_orig')->nullable();
$table->bigInteger('date_last')->nullable();
$table->integer('country_id')->default(0)->index('fk_tax_cty_idx');
$table->string('zone', 128)->nullable();
$table->string('description')->nullable();
$table->float('rate', 10, 0)->nullable();
$table->boolean('tax_id_collect')->nullable();
$table->string('tax_id_name', 32)->nullable();
$table->boolean('tax_id_req')->nullable();
$table->boolean('tax_id_exempt')->nullable();
$table->string('tax_id_regex')->nullable();
$table->unique(['country_id','zone'], 'UNIQUE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_tax');
}
}