<?php

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

class CreateTablePropertyWebAboutUsTable extends Migration
{

    public function up()
    {
        DB::statement("
         CREATE TABLE `property_web_about_us` (
        `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
        `property_id` int(10) unsigned NOT NULL,
        `property_web_id` bigint(20) unsigned NOT NULL,
        `language_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
        `value` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `status` tinyint(3) unsigned NOT NULL DEFAULT '1',
        `created_by` int(10) unsigned NOT NULL,
        `updated_by` int(10) unsigned NOT NULL,
        `created_at` int(11) NOT NULL,
        `updated_at` int(11) NOT NULL,
        PRIMARY KEY (`id`),
        FOREIGN KEY ( `property_id` ) REFERENCES `property` ( `id` ) ON DELETE RESTRICT ON UPDATE RESTRICT,
        FOREIGN KEY ( `property_web_id` ) REFERENCES `property_web` ( `id` ) ON DELETE RESTRICT ON UPDATE RESTRICT,
        FOREIGN KEY ( `language_code` ) REFERENCES `language` ( `code` ) ON DELETE RESTRICT ON UPDATE RESTRICT,
        FOREIGN KEY ( `created_by` ) REFERENCES `user` ( `id` ) ON DELETE RESTRICT ON UPDATE RESTRICT,
        FOREIGN KEY ( `updated_by` ) REFERENCES `user` ( `id` ) ON DELETE RESTRICT ON UPDATE RESTRICT
        )
       ");
    }


    public function down()
    {

    }
}
