Files
newznab-tmux/database/migrations/2017_10_12_124141_create_countries_table.php
T
DariusIII f390796790 Apply fixes from StyleCI
[ci skip] [skip ci]
2017-10-12 10:55:39 +00:00

32 lines
735 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('countries', function (Blueprint $table) {
$table->char('id', 2)->primary()->comment('2 character code.');
$table->char('iso3', 3)->unique('code3')->comment('3 character code.');
$table->string('country', 180)->unique('country')->comment('Name of the country.');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('countries');
}
}