<?php

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

class CreateTableRoomSizeType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {

        DB::statement('
                CREATE TABLE `property_room_size_type`  (
              `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
              `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
              `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
              `language_key` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
              `status` tinyint(4) 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`) USING BTREE,
              INDEX `property_room_size_type_created_by_foreign`(`created_by`) USING BTREE,
              INDEX `property_room_size_type_updated_by_foreign`(`updated_by`) USING BTREE,
              CONSTRAINT `property_room_size_type_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
              CONSTRAINT `property_room_size_type_updated_by_foreign` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
            ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
        ');

        DB::statement("INSERT INTO `property_room_size_type` VALUES (1, 'Square Meters', 'mt', 'enw-input-square_meters', 1, 1, 1, 1, 1)");
        DB::statement("INSERT INTO `property_room_size_type` VALUES (2, 'Square Feet', 'ft', 'enw-input-square_feet', 1, 1, 1, 1, 1)");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

    }
}
