<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateResidenceTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create( 'residences', function ( Blueprint $table ) {
			$table->increments( 'id' );
			$table->integer( 'user_id' )->nullable();
			$table->string( 'name' )->nullable();
			$table->string( 'other_name' )->nullable();
			$table->integer( 'day_birth' )->nullable();
			$table->integer( 'month_birth' )->nullable();
			$table->integer( 'year_birth' )->nullable();
			$table->tinyInteger( 'gender' )->nullable();
			$table->string( 'birth_location' )->nullable();
			$table->string( 'hometown' )->nullable();
			$table->string( 'folk' )->nullable();
			$table->string( 'religion' )->nullable();
			$table->string( 'nationality' )->nullable();
			$table->string( 'id_number' )->nullable();
			$table->string( 'passport_number' )->nullable();
			$table->string( 'residence_location' )->nullable();
			$table->string( 'current_address' )->nullable();
			$table->string( 'learning' )->nullable();
			$table->string( 'skill' )->nullable();
			$table->string( 'folk_lang' )->nullable();
			$table->string( 'foreign_lang' )->nullable();
			$table->string( 'job' )->nullable();
			$table->text( 'summarize_yourself' )->nullable();
			$table->text( 'criminal' )->nullable();
			$table->text( 'summarize_family' )->nullable();
			$table->timestamps();
		} );
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::dropIfExists( 'residence' );
	}
}
