<?php

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

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

    public function up()
    {

        /*
         * Table: bixo_offplan_projects
         */
        Schema::create('bixo_offplan_projects', function ($table) {
            $table->increments('id');
            $table->string('ref', 20)->nullable();
            $table->integer('country_id')->nullable();
            $table->integer('developer_id')->nullable();
            $table->integer('region_id')->nullable();
            $table->integer('location_id')->nullable();
            $table->integer('sublocation_id')->nullable();
            $table->integer('building_id')->nullable();
            $table->string('name', 200)->nullable();
            $table->string('title', 200)->nullable();
            $table->string('start_price', 50)->nullable();
            $table->string('completion', 50)->nullable();
            $table->text('payment_plan')->nullable();
            $table->text('description')->nullable();
            $table->longText('description_more')->nullable();
            $table->mediumText('documents')->nullable();
            $table->mediumText('features')->nullable();
            $table->mediumText('distances')->nullable();
            $table->mediumText('photos')->nullable();
            $table->mediumText('floor_plans')->nullable();
            $table->tinyInteger('exclusive')->nullable();
            $table->text('medias')->nullable();
            $table->integer('created_by')->nullable();
            $table->text('marking', 200)->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

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

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