2016-02-29 15:59:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
2016-03-05 00:18:10 +00:00
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2016-02-29 15:59:36 +00:00
|
|
|
|
2016-03-05 00:18:10 +00:00
|
|
|
class SetupCountriesTable extends Migration
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
|
|
|
|
// Creates the users table
|
2016-03-20 16:01:50 +00:00
|
|
|
Schema::create('countries', function ($table) {
|
2016-03-05 00:18:10 +00:00
|
|
|
$table->integer('id')->index();
|
|
|
|
|
$table->string('capital', 255)->nullable();
|
|
|
|
|
$table->string('citizenship', 255)->nullable();
|
|
|
|
|
$table->string('country_code', 3)->default('');
|
|
|
|
|
$table->string('currency', 255)->nullable();
|
|
|
|
|
$table->string('currency_code', 255)->nullable();
|
|
|
|
|
$table->string('currency_sub_unit', 255)->nullable();
|
|
|
|
|
$table->string('full_name', 255)->nullable();
|
|
|
|
|
$table->string('iso_3166_2', 2)->default('');
|
|
|
|
|
$table->string('iso_3166_3', 3)->default('');
|
|
|
|
|
$table->string('name', 255)->default('');
|
|
|
|
|
$table->string('region_code', 3)->default('');
|
|
|
|
|
$table->string('sub_region_code', 3)->default('');
|
|
|
|
|
$table->boolean('eea')->default(0);
|
2016-02-29 15:59:36 +00:00
|
|
|
|
2016-03-05 00:18:10 +00:00
|
|
|
$table->primary('id');
|
|
|
|
|
});
|
|
|
|
|
}
|
2016-02-29 15:59:36 +00:00
|
|
|
|
2016-03-05 00:18:10 +00:00
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
2016-03-20 16:01:50 +00:00
|
|
|
Schema::drop('countries');
|
2016-03-05 00:18:10 +00:00
|
|
|
}
|
2016-02-29 15:59:36 +00:00
|
|
|
}
|