<?php

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

class CreatePropertyRoomRatePriceQueueTable extends Migration
{

    public function up()
    {
        DB::statement("
            CREATE TABLE `property_room_rate_price_queue` (`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
            `table_id` bigint(20) unsigned NOT NULL,
            `property_id` int(10) unsigned NOT NULL,
            `property_room_id` bigint(20) unsigned NOT NULL,
            `room_rate_mapping_id` bigint(20) unsigned NOT NULL,
            `offer_id` bigint(20) unsigned DEFAULT NULL,
            `channel_id` int(10) unsigned DEFAULT NULL,
            `min_stay` tinyint(4) NOT NULL,
            `max_stay` tinyint(4) NOT NULL,
            `stop_sell` tinyint(4) NOT NULL,
            `booking_on_request` tinyint(4) NOT NULL,
            `date` date NOT NULL,
            `amount` double(10,2) NOT NULL,
            `currency` varchar(3) 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`),
            UNIQUE KEY `uq_tableid` (`table_id`),KEY `ix_tableid` (`table_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
        ");
    }


    public function down()
    {
        //
    }
}
