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

40 lines
872 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAbCountryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ab_country', function(Blueprint $table)
{
$table->integer('id')->default(0)->primary();
$table->string('name', 128)->nullable()->unique('name_UNIQUE');
$table->string('description', 128)->nullable();
$table->string('notes', 128)->nullable();
$table->string('two_code', 16)->nullable()->unique('two_code_UNIQUE');
$table->string('three_code', 16)->nullable()->unique('three_code_UNIQUE');
$table->boolean('active')->nullable();
$table->integer('currency_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ab_country');
}
}