File: /mnt/data/ghayatcom/ghayatcom-api/database/migrations/2014_10_11_000000_create_country_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCountryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
$table->char('iso3', 3);
$table->char('iso2', 2);
$table->string('phone_code');
$table->string('capital');
$table->string('currency');
$table->string('native')->nullable();
$table->string('emoji')->nullable();
$table->string('emojiU')->nullable();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrentOnUpdate();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('countries');
}
}