54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateCountriesTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('countries', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->char('code', 2)->index();
|
|
$table->string('phone', 6);
|
|
$table->string('en', 100)->index();
|
|
$table->string('de', 100)->index();
|
|
$table->string('es', 100);
|
|
$table->string('fr', 100);
|
|
$table->string('it', 100);
|
|
$table->string('ru', 100);
|
|
|
|
$table->boolean('active')->default(true);
|
|
$table->boolean('supply_country')->default(false);
|
|
$table->boolean('eu_country')->default(false);
|
|
$table->boolean('switch')->default(false);
|
|
$table->boolean('translate')->default(false);
|
|
$table->boolean('own_eur')->default(false);
|
|
$table->boolean('currency')->default(false);
|
|
$table->string('currency_unit', 10)->nullable();
|
|
$table->boolean('currency_calc')->default(false);
|
|
$table->decimal('currency_faktor', 4, 2)->nullable();
|
|
|
|
$table->text('trans_name')->nullable();
|
|
$table->text('attr')->nullable();
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('countries');
|
|
}
|
|
}
|