<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cities', function (Blueprint $table) {
            $table->smallIncrements('id');
            $table->unsignedTinyInteger('province_id')->nullable()->index('cities_province_id_foreign');
            $table->string('name_fa');
            $table->string('name_en')->nullable();
            $table->unsignedSmallInteger('type_id')->nullable();
            $table->unsignedTinyInteger('province_feature_id')->nullable();
            $table->decimal('center_lat', 12, 10)->nullable();
            $table->decimal('center_long', 12, 10)->nullable();
            $table->string('abrar_process')->nullable();
            $table->timestamps();
        });
    }

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