<?php

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

class CreateBixoMapProjectsTable extends Migration
{
    /*
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {

        /*
         * Table: bixo_map_projects
         */
        Schema::create('bixo_map_projects', function ($table) {
            $table->increments('id');
            $table->integer('project_id')->nullable();
            $table->integer('project_number')->nullable();
            $table->string('project_name', 50)->nullable();
            $table->integer('developer_id')->nullable();
            $table->integer('developer_number')->nullable();
            $table->string('developer_name', 50)->nullable();
            $table->integer('master_developer_id')->nullable();
            $table->integer('master_developer_number')->nullable();
            $table->string('master_developer_name', 50)->nullable();
            $table->date('project_start_date')->nullable();
            $table->date('project_end_date')->nullable();
            $table->integer('project_type_id')->nullable();
            $table->string('project_type_ar', 20)->nullable();
            $table->integer('project_classification_id')->nullable();
            $table->string('project_classification_ar', 50)->nullable();
            $table->integer('escrow_agent_id')->nullable();
            $table->string('escrow_agent_name', 50)->nullable();
            $table->string('project_status', 50)->nullable();
            $table->string('project_status_ar', 50)->nullable();
            $table->integer('percent_completed')->nullable();
            $table->date('completion_date')->nullable();
            $table->date('cancellation_date')->nullable();
            $table->text('project_description_ar')->nullable();
            $table->text('project_description_en')->nullable();
            $table->integer('property_id')->nullable();
            $table->integer('area_id')->nullable();
            $table->string('area_name_ar', 50)->nullable();
            $table->string('area_name_en', 50)->nullable();
            $table->string('master_project_ar', 50)->nullable();
            $table->string('master_project_en', 50)->nullable();
            $table->integer('zoning_authority_id')->nullable();
            $table->string('zoning_authority_ar', 50)->nullable();
            $table->string('zoning_authority_en', 50)->nullable();
            $table->integer('no_of_lands')->nullable();
            $table->integer('no_of_buildings')->nullable();
            $table->integer('no_of_villas')->nullable();
            $table->integer('no_of_units')->nullable();
            $table->text('marking', 200)->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

    /*
    * Reverse the migrations.
    *
    * @return void
    */

    public function down()
    {
        Schema::drop('bixo_map_projects');
    }
}