<?php

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

class CreateProvincesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('provinces', function (Blueprint $table) {
            $table->tinyIncrements('id');
            $table->string('name_fa');
            $table->string('name_en')->nullable();
            $table->unsignedTinyInteger('feature_id')->nullable();
            $table->decimal('center_lat', 12, 10)->nullable();
            $table->decimal('center_long', 12, 10)->nullable();
            $table->timestamps();
        });
    }

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