TABLE reservations_missed ( id BIGINT NOT NULL AUTO_INCREMENT, confirmation_number VARCHAR(50) NOT NULL, itnerary VARCHAR(50) NOT NULL, if_missed_itin TEXT NOT NULL, PRIMARY KEY (id) ) TABLE reservations_missed_payments ( id INTEGER NOT NULL AUTO_INCREMENT, confirmation_number VARCHAR(200) NOT NULL, cc_type VARCHAR(200) NOT NULL, cc_number_enc VARCHAR(200) NOT NULL, cc_last4 VARCHAR(200) NOT NULL, cc_owner VARCHAR(200) NOT NULL, cc_exp_month VARCHAR(200) NOT NULL, cc_exp_year VARCHAR(200) NOT NULL, PRIMARY KEY (id) ) TABLE reservations_room_moves ( id INTEGER NOT NULL AUTO_INCREMENT, hotel_id INTEGER NOT NULL, confirmation_number VARCHAR(50) NOT NULL, from_room INTEGER NOT NULL, to_room INTEGER NOT NULL, moved_date DATE NOT NULL, moved_by INTEGER NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY (id) ) TABLE hotels ( hotel_id INTEGER NOT NULL AUTO_INCREMENT, hotel_code VARCHAR(50) NOT NULL, hotel_title VARCHAR(100) NOT NULL, parent_id INTEGER NOT NULL DEFAULT '0', sort_order SMALLINT NOT NULL, default_sub_hotel SMALLINT NOT NULL DEFAULT '0', PRIMARY KEY (hotel_id) ) TABLE hotelrooms ( id INTEGER NOT NULL AUTO_INCREMENT, hotel_id INTEGER NOT NULL, type VARCHAR(50) NOT NULL DEFAULT 'room', totalrooms INTEGER NOT NULL, totalavailablerooms INTEGER NOT NULL, `roomsIds` TEXT NOT NULL, block INTEGER NOT NULL, hold INTEGER NOT NULL, bundleblock INTEGER NOT NULL, rented INTEGER NOT NULL, `blockIds` TEXT NOT NULL, `holdIds` TEXT NOT NULL, `bundleblockIds` TEXT NOT NULL, `rentedIds` TEXT NOT NULL, date DATE NOT NULL, arrival INTEGER NOT NULL, departure INTEGER NOT NULL, stayover INTEGER NOT NULL, `channelFigures` MEDIUMTEXT NOT NULL, rentals MEDIUMTEXT NOT NULL, `taxFigures` MEDIUMTEXT NOT NULL, `ancilliaryProductsFigures` MEDIUMTEXT NOT NULL, originalrooms INTEGER NOT NULL, bundlerooms INTEGER NOT NULL, `bundleroomsIds` TEXT, persons INTEGER NOT NULL, PRIMARY KEY (id) ) TABLE hotel_price_121 ( price_id BIGINT NOT NULL AUTO_INCREMENT, room_type_id INTEGER NOT NULL, sub_hotel_id INTEGER NOT NULL, channel_id INTEGER NOT NULL, room_type_price FLOAT(12, 2) NOT NULL, date DATE, rate_plan_id INTEGER NOT NULL, channex_rate_plan_id VARCHAR(100), is_stop_sell SMALLINT NOT NULL, is_cta SMALLINT NOT NULL, is_ctd SMALLINT NOT NULL, min_stay SMALLINT NOT NULL DEFAULT '-1', max_stay SMALLINT NOT NULL DEFAULT '-1', is_price_data SMALLINT NOT NULL DEFAULT '1', modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, rates_time_changed DATETIME NOT NULL, others_time_changed DATETIME NOT NULL, rates_cron_processed TINYINT(1) NOT NULL DEFAULT '1', other_cron_processed TINYINT(1) NOT NULL COMMENT 'this column updates when only stop cell is updated' DEFAULT '1', mls_cron_processed TINYINT NOT NULL DEFAULT '1', cta_cron_processed INTEGER NOT NULL DEFAULT '1', ctd_cron_processed INTEGER NOT NULL DEFAULT '1', fresh_rate_cron_processed TINYINT NOT NULL DEFAULT '1', status ENUM('0','1') NOT NULL DEFAULT '1', PRIMARY KEY (price_id) ) TABLE check_res ( `Book_Number` DOUBLE, `Booked_by` VARCHAR(100), `Guest_Names` VARCHAR(100), `Checkin` VARCHAR(100), `Checkout` VARCHAR(100), `Booked_on` VARCHAR(100), `Status` VARCHAR(100), `Rooms` DOUBLE, `People` DOUBLE, `Adults` VARCHAR(100), `Children` VARCHAR(100), `Childrens_ages` VARCHAR(100), `Price` VARCHAR(100), `Commission_` DOUBLE, `Commission_Amount` VARCHAR(100), `Payment_Status` VARCHAR(100), `Payment_Method` VARCHAR(100), `Remarks` VARCHAR(100) ) TABLE reservation_room_stays ( room_stay_id BIGINT NOT NULL AUTO_INCREMENT, reservation_id BIGINT, confirmation_number VARCHAR(50) NOT NULL, room_confirmation_number VARCHAR(50) COMMENT 'Only for POS/Services/Room moved to, confirmation number of associated room', room_moved_from VARCHAR(50), room_moved_to VARCHAR(50), webpos_one_go_order_number VARCHAR(50), bundle_blocked_ids VARCHAR(1000), product_is_timebound SMALLINT NOT NULL, is_timebound_with_availability SMALLINT NOT NULL DEFAULT '0', room_stay_from DATE NOT NULL, room_stay_to DATE NOT NULL, room_stay_guest_count SMALLINT NOT NULL DEFAULT '0', room_stay_child_count SMALLINT NOT NULL DEFAULT '0', age_qualifying_id SMALLINT, room_stay_comment VARCHAR(500), room_stay_special_req VARCHAR(500), guarentee_info VARCHAR(500) NOT NULL, block_emails SMALLINT NOT NULL, customer_id INTEGER NOT NULL, customer_name VARCHAR(500) NOT NULL COMMENT 'for hold and block only', is_gift_card SMALLINT NOT NULL DEFAULT '0', is_tip_product SMALLINT NOT NULL, tip_customer_id INTEGER NOT NULL DEFAULT '0', gc_sender_name VARCHAR(50), gc_sender_email VARCHAR(50), gc_recipient_name VARCHAR(50), gc_recipient_email VARCHAR(50), gc_message VARCHAR(500), gc_code VARCHAR(50), arrival_time VARCHAR(10) NOT NULL, departure_time VARCHAR(10) NOT NULL, `posAmt_airbnb_taxpaid` FLOAT(12, 2), `roomAmt_airbnb_taxpaid` FLOAT(12, 2), room_stay_status ENUM('Checked-In','Checked-Out','Closed','Active','Canceled') NOT NULL DEFAULT 'Active', hotel_id INTEGER NOT NULL, sub_hotel_id INTEGER NOT NULL, initial_hotel_id INTEGER NOT NULL, service_quantity SMALLINT, original_price FLOAT(12, 2) NOT NULL, subtotal FLOAT(12, 2) NOT NULL, product_discount FLOAT(12, 2) NOT NULL, product_discount_comment TEXT NOT NULL, additional_guest_amounts FLOAT(12, 2) NOT NULL, discount_percentage FLOAT(12, 2) NOT NULL, discount_amount FLOAT(12, 2) NOT NULL, grand_total FLOAT(12, 2) NOT NULL, paid_amount FLOAT(12, 2) NOT NULL, remaining_amount FLOAT(12, 2) NOT NULL, total_deposit_amount FLOAT(12, 2) NOT NULL COMMENT 'Total original deposit amount of order including room, room moved to and services', total_amount FLOAT(12, 2) NOT NULL COMMENT 'Total amounts of order including room, room moved to and services', total_paid_amount FLOAT(12, 2) NOT NULL COMMENT 'Total paid amount of order including room, room moved to and services', total_remaining_amount FLOAT(12, 2) NOT NULL COMMENT 'Total remaining amount of order including room, room moved to and services', product_id INTEGER NOT NULL, product_name VARCHAR(200) NOT NULL, additional_data TEXT NOT NULL, policy_id SMALLINT NOT NULL, nightly_price TEXT NOT NULL, nightly_discount TEXT NOT NULL, rate_plan_ids TEXT NOT NULL, canceled_nights_data TEXT NOT NULL, room_number_locked_indicator SMALLINT NOT NULL, hold_duration DATETIME NOT NULL COMMENT 'release date for hold reservations', type_of_reservation ENUM('hold','block','reservation','service','bundleblock','boat','restaurant','boat_service','rent') NOT NULL DEFAULT 'reservation', old_tax_amounts TEXT, order_history_comment VARCHAR(250), source_of_creation VARCHAR(50) NOT NULL, collect_which VARCHAR(20) NOT NULL COMMENT 'channel collect or hotel collect', siteminder_id VARCHAR(50) NOT NULL, commision_charges FLOAT(12, 2) NOT NULL, ota_service_fee_amount FLOAT DEFAULT '0', commission_charges_in_tax_indicator SMALLINT NOT NULL, promotion_applied SMALLINT NOT NULL DEFAULT '0', promotion_id INTEGER, promotion_code VARCHAR(250), cart_item_id INTEGER NOT NULL, created_by_user INTEGER NOT NULL, auto_added SMALLINT NOT NULL, pos_auto_sync_dates SMALLINT NOT NULL DEFAULT '0', split_payment_order SMALLINT NOT NULL DEFAULT '0', tip_after_order SMALLINT NOT NULL DEFAULT '0', migrated_id VARCHAR(1000) NOT NULL, is_canceled SMALLINT NOT NULL DEFAULT '0', is_deleted SMALLINT NOT NULL DEFAULT '0', reservation_created_by INTEGER NOT NULL, reservation_created_date DATETIME NOT NULL, created_date DATETIME NOT NULL, modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, time_stamp_created VARCHAR(50), reservation_modified_date_time DATETIME, service_canceled_date_time DATETIME, reservation_status_type VARCHAR(100) NOT NULL, room_type_id INTEGER NOT NULL, fe_display_product_name VARCHAR(1000) NOT NULL, quick_book_invoice_id INTEGER NOT NULL, sm_room_moved_pms SMALLINT NOT NULL, product_attribute_fields TEXT, product_attribute_values TEXT, review_clicked SMALLINT NOT NULL, boat_data TEXT NOT NULL, restaurant_product_ingrediants VARCHAR(255) NOT NULL, restaurant_product_removed_ingrediants VARCHAR(100) NOT NULL, restaurant_product_note TEXT NOT NULL, restaurant_product_amount FLOAT, restaurant_order_take_or_eat VARCHAR(30) NOT NULL, restaurant_order_status VARCHAR(50), tax_exempt_status TINYINT(1) NOT NULL DEFAULT '0', traveller_tax_exempt SMALLINT NOT NULL DEFAULT '0', customer_traveller_id INTEGER NOT NULL, current_billing INTEGER NOT NULL, products_added_while_create SMALLINT NOT NULL DEFAULT '0', negotiated_rate_resv SMALLINT NOT NULL DEFAULT '0', resv_is_no_show SMALLINT NOT NULL DEFAULT '0', resv_no_show_amounts TEXT, resv_is_refunded SMALLINT NOT NULL DEFAULT '0', charge_ext_per_virtual_card SMALLINT NOT NULL DEFAULT '0', ota_pms_nights_info TEXT NOT NULL, promo_code_info TEXT NOT NULL, echeckin_completed TINYINT NOT NULL DEFAULT '0', PRIMARY KEY (room_stay_id) ) TABLE reservations ( reservation_id BIGINT NOT NULL AUTO_INCREMENT, confimation_required SMALLINT NOT NULL COMMENT '*Not in use', queue_id INTEGER NOT NULL COMMENT '*Not in use', room_stay_reservation SMALLINT NOT NULL COMMENT 'true if even single room is present', reservation_status VARCHAR(50) NOT NULL, forced_sell_indicator SMALLINT NOT NULL COMMENT 'booked when no inventory', service_override_indicator SMALLINT NOT NULL, rate_override_indicator SMALLINT NOT NULL, walk_in_indicator SMALLINT NOT NULL, res_resource_type_id SMALLINT NOT NULL, passive_indicator SMALLINT NOT NULL, reservation_comment VARCHAR(500) NOT NULL, reservation_special_req VARCHAR(500) NOT NULL, total_amount FLOAT(12, 2) NOT NULL, total_commission FLOAT(12, 2) NOT NULL, discount_amount FLOAT(12, 2) NOT NULL, tax_amount FLOAT(12, 2) NOT NULL, grand_total FLOAT(12, 2) NOT NULL, subtotal FLOAT(12, 2) NOT NULL, total_item_count SMALLINT NOT NULL, hotel_id INTEGER NOT NULL, quote_info TEXT NOT NULL, itinerary_number VARCHAR(20) NOT NULL, black_listed_reservation TINYINT(1) NOT NULL DEFAULT '0', remote_ip VARCHAR(10) NOT NULL, created_date DATETIME NOT NULL, modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (reservation_id) ) TABLE products ( product_id INTEGER NOT NULL AUTO_INCREMENT, product_name VARCHAR(200) NOT NULL, product_is_clean SMALLINT NOT NULL COMMENT 'Rooms only - for housekeeping department to see if a room is clean or dirty', product_description VARCHAR(1000) NOT NULL COMMENT 'For Non Room type products', product_tax INTEGER NOT NULL COMMENT 'For Non Room type products', product_price FLOAT(12, 2) NOT NULL COMMENT 'For Non Room type products', additional_price FLOAT(12, 2) NOT NULL, product_is_timebound SMALLINT NOT NULL, is_timebound_with_availability SMALLINT NOT NULL DEFAULT '0', product_status SMALLINT NOT NULL DEFAULT '1', product_type ENUM('room','pos','gift_card','boat','rent') NOT NULL, product_sort_order SMALLINT NOT NULL, product_room_number VARCHAR(50) NOT NULL, hotel_room_id INTEGER NOT NULL, hotel_id SMALLINT NOT NULL, sub_hotel_id INTEGER NOT NULL, type_id INTEGER NOT NULL COMMENT 'for rooms - room_type_id and for pos pos_type_id', pos_display_tax_indicator SMALLINT NOT NULL COMMENT 'if 1 tax is included if 0 tax is excluded', created_by_user INTEGER NOT NULL, created_date DATETIME NOT NULL, modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, product_pos_type VARCHAR(255) NOT NULL, is_walk SMALLINT NOT NULL DEFAULT '0', is_bundle SMALLINT NOT NULL DEFAULT '0', available_on_fe SMALLINT NOT NULL COMMENT 'Pos products to show on FE or not' DEFAULT '0', auto_add_to_cart SMALLINT NOT NULL DEFAULT '0', pos_auto_sync_dates SMALLINT NOT NULL, used_count INTEGER NOT NULL, display_on_cart SMALLINT NOT NULL COMMENT 'parking show on cart' DEFAULT '0', display_on_pms SMALLINT NOT NULL DEFAULT '1', allowed_for_all_rooms SMALLINT NOT NULL DEFAULT '1', associate_with_rooms VARCHAR(1000) NOT NULL, associate_with_other_pos SMALLINT NOT NULL DEFAULT '1', associate_with_pos VARCHAR(1000) NOT NULL, quick_book_product_id INTEGER NOT NULL, fe_display_product_name VARCHAR(1000) NOT NULL, dynamic_attribute SMALLINT NOT NULL, send_external_email SMALLINT NOT NULL DEFAULT '0', external_email_receiver VARCHAR(100) NOT NULL, external_email_template_id INTEGER NOT NULL DEFAULT '0', restaurant_attribute SMALLINT NOT NULL DEFAULT '0', variable_price INTEGER NOT NULL DEFAULT '0', happy_hours FLOAT NOT NULL DEFAULT '0', happyhour_price FLOAT NOT NULL DEFAULT '0', m3_names VARCHAR(100), villa_type VARCHAR(30), static_pos_type VARCHAR(20), extra_attribute VARCHAR(30) NOT NULL, extra_attribute_type VARCHAR(30) NOT NULL, extra_attribute_value FLOAT NOT NULL, is_ota_value_same INTEGER NOT NULL COMMENT '''1'' if ota price is same as DC & ''0'' if ota price is different than DC', extra_attribute_ota_value FLOAT NOT NULL, product_clean_date DATETIME, boat_width FLOAT NOT NULL, PRIMARY KEY (product_id) ) TABLE reservation_payment_installments ( installment_id BIGINT NOT NULL AUTO_INCREMENT, reservation_id BIGINT NOT NULL, hotel_id INTEGER NOT NULL COMMENT 'hotel_id/sub_hotel_id ' DEFAULT '0', is_migrated INTEGER NOT NULL DEFAULT '0', confirmation_number VARCHAR(50) NOT NULL, paid_for_confirmation_number TEXT NOT NULL, webpos_one_go_order_number VARCHAR(50) NOT NULL, installment_amount FLOAT(12, 2) NOT NULL, installment_paid_date DATETIME NOT NULL, installment_status ENUM('paid','remaining','refunded','declined','voided','refund-voided') NOT NULL DEFAULT 'remaining', payment_method VARCHAR(50), txn_id VARCHAR(100) NOT NULL, other_comment VARCHAR(500) NOT NULL, check_number VARCHAR(25) NOT NULL, cc_is_incidental SMALLINT NOT NULL, cc_number VARCHAR(4) NOT NULL, customer_profile_id VARCHAR(25) NOT NULL, payment_profile_id VARCHAR(25) NOT NULL, cc_type VARCHAR(50), cc_cid VARCHAR(10) NOT NULL, cc_fname VARCHAR(25) NOT NULL, cc_mname VARCHAR(25) NOT NULL, cc_lname VARCHAR(25) NOT NULL, cc_exp_month VARCHAR(2) NOT NULL, cc_exp_year VARCHAR(4) NOT NULL, pci_token TEXT, original_paid_amount FLOAT(12, 2) NOT NULL, bank_name VARCHAR(255) NOT NULL, routing_number VARCHAR(50) NOT NULL, account_number VARCHAR(50) NOT NULL, account_type ENUM('checking','saving','businessChecking') NOT NULL, name_on_account VARCHAR(100) NOT NULL, echeck_type ENUM('WEB','PPD','BOC','CCD','TEL') NOT NULL, rm_adjustment_indicator SMALLINT NOT NULL, cannot_refund_indicator SMALLINT NOT NULL, created_by_user INTEGER NOT NULL, cc_number_from_live VARCHAR(50) NOT NULL, amount_to_refund FLOAT(12, 2) NOT NULL, reason VARCHAR(300) NOT NULL, payment_transfered_from INTEGER, `adjusted_confNos` VARCHAR(25) NOT NULL, refund_parent_installment_id VARCHAR(255) NOT NULL, customer_traveller_payments INTEGER NOT NULL, gateway ENUM('none','channexpci','authorize','universal') DEFAULT 'none', PRIMARY KEY (installment_id) ) TABLE reservation_taxes_fees ( res_tax_id INTEGER NOT NULL AUTO_INCREMENT, reservation_id BIGINT NOT NULL, confirmation_number VARCHAR(50) NOT NULL, tax_id INTEGER NOT NULL, tax_amount FLOAT(12, 2) NOT NULL, tax_percentage FLOAT(12, 2) NOT NULL, abb_tax_paid_sm FLOAT(12, 2), abb_tax_paid_pms FLOAT(12, 2), PRIMARY KEY (res_tax_id) ) TABLE reservation_customer_info ( id INTEGER NOT NULL AUTO_INCREMENT, reservation_id BIGINT NOT NULL, confirmation_number VARCHAR(50) NOT NULL, service_id BIGINT NOT NULL, customer_id INTEGER NOT NULL, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT NULL, customer_email VARCHAR(100) NOT NULL, tax_exempt_indicator INTEGER NOT NULL DEFAULT '0', phone_number VARCHAR(20) NOT NULL, secondary_phone_number VARCHAR(25) NOT NULL, city VARCHAR(25) NOT NULL, zip_code VARCHAR(10) NOT NULL, state VARCHAR(25) NOT NULL, country VARCHAR(25) NOT NULL, address VARCHAR(500) NOT NULL, trav_same_as_cust SMALLINT NOT NULL, customer_group_event_code VARCHAR(50) NOT NULL, customer_is_vip SMALLINT NOT NULL, customer_primary_indicator SMALLINT NOT NULL, customer_age SMALLINT NOT NULL, customer_location_group VARCHAR(50) NOT NULL, customer_action_on_guest_entry VARCHAR(500) NOT NULL, created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ) TABLE reservation_comments_requests ( id BIGINT NOT NULL AUTO_INCREMENT, reservation_id BIGINT NOT NULL, confirmation_number VARCHAR(50) NOT NULL, room_confirmation_number VARCHAR(50) NOT NULL, comm_req_value TEXT NOT NULL, comm_req_type ENUM('comment','special_request') NOT NULL, created_by_user INTEGER DEFAULT '0', created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id) ) TABLE room_types ( room_type_id INTEGER NOT NULL AUTO_INCREMENT, hotel_id INTEGER NOT NULL, sub_hotel_id INTEGER NOT NULL, room_type_refs_id VARCHAR(255) NOT NULL, room_type_description TEXT NOT NULL, room_type_name VARCHAR(1000) NOT NULL, room_display_name VARCHAR(1000) NOT NULL, room_type_code VARCHAR(1000) NOT NULL, room_type_id_channex VARCHAR(100), room_type ENUM('room','room_type','boat','boat_type','rent','rent_type','group_rooms') NOT NULL DEFAULT 'room', room_type_sort_order INTEGER NOT NULL DEFAULT '1', room_shorthand VARCHAR(50), bed_type_id INTEGER NOT NULL, bedroom_room_type VARCHAR(100) NOT NULL, non_smoking_ind SMALLINT NOT NULL, additional_guest_amounts FLOAT(12, 2) NOT NULL, max_occupancy SMALLINT NOT NULL DEFAULT '2', normal_occupancy SMALLINT NOT NULL DEFAULT '2', max_adult_occupancy SMALLINT NOT NULL DEFAULT '2', max_child_occupancy SMALLINT NOT NULL, max_infant_occupancy SMALLINT NOT NULL, room_location_id SMALLINT NOT NULL, room_view_id SMALLINT NOT NULL, guest_room_id SMALLINT NOT NULL COMMENT 'RoomQuality - Specifies the room classification (e.g., cabin, apartment). Refer to OpenTravel Code List Guest Room Info (GRI).', nbr_of_bedrooms SMALLINT NOT NULL, accessible_ind SMALLINT NOT NULL, room_gender ENUM('Male','Female','MaleAndFemale','Unknown') NOT NULL, check_in_time TIME NOT NULL, check_out_time TIME NOT NULL, status_type ENUM('initial','active','inactive') NOT NULL DEFAULT 'initial', is_walk_type SMALLINT NOT NULL, srp_card_color VARCHAR(50) NOT NULL, srp_card_color_sec VARCHAR(50) NOT NULL, inside_view_longitude VARCHAR(50) NOT NULL, inside_view_latitude VARCHAR(50) NOT NULL, inside_view_height VARCHAR(50) NOT NULL, inside_view_pano_id VARCHAR(50) NOT NULL, created_by_user INTEGER NOT NULL, created_date DATETIME NOT NULL, modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, boat_length FLOAT NOT NULL, boat_width FLOAT NOT NULL, sort_order SMALLINT NOT NULL, accessible_front_door VARCHAR(50) NOT NULL, accessible_front_door_step VARCHAR(50) NOT NULL, accessible_bathroom_door VARCHAR(50) NOT NULL, accessible_closet_to_counter VARCHAR(50) NOT NULL, accessible_shower_handle VARCHAR(50) NOT NULL, accessible_toilet_handle VARCHAR(50) NOT NULL, accessible_sink_height VARCHAR(50) NOT NULL, accessible_toilet_seat_height VARCHAR(50) NOT NULL, surcharge FLOAT NOT NULL, surcharge_description TEXT NOT NULL, additional_products VARCHAR(255) NOT NULL, PRIMARY KEY (room_type_id) ) TABLE taxes ( tax_id INTEGER NOT NULL AUTO_INCREMENT, tax_name VARCHAR(100) NOT NULL, tax_common_name VARCHAR(50) NOT NULL COMMENT 'Common tax name for similar category taxes across all hotels', tax_value FLOAT(12, 2), hotel_id INTEGER NOT NULL, applied_on_field VARCHAR(25) NOT NULL COMMENT 'defines the field on which a tax will be applied', not_applicable_for_channels VARCHAR(50) NOT NULL, fee_associated_tax INTEGER NOT NULL, tax_associated_fee INTEGER NOT NULL, quick_book_tax_id INTEGER NOT NULL, default_tax SMALLINT NOT NULL, sort_order INTEGER NOT NULL DEFAULT '1', PRIMARY KEY (tax_id) ) -- taxes.tax_id = taxes.tax_associated_fee (LEFT JOIN) -- taxes.tax_id = reservation_taxes_fees.tax_id (INNER JOIN) -- reservation_taxes_fees.tax_id can be joined with taxes.tax_id (JOIN) -- products.type_id can be joined with room_types.room_type_id (LEFT JOIN) -- products.product_id can be joined with reservation_room_stays.product_id (JOIN) -- reservations.reservation_id = reservation_room_stays.reservation_id (INNER JOIN) -- reservation_room_stays.product_id can be joined with products.product_id (INNER JOIN) -- reservations.reservation_id can be joined with reservation_room_stays.reservation_id (JOIN) -- reservation_room_stays.room_moved_from = reservation_room_stays.confirmation_number (SELF JOIN) -- reservation_room_stays.reservation_id can be joined with reservations.reservation_id (INNER JOIN) -- reservation_taxes_fees.confirmation_number = reservation_room_stays.confirmation_number (LEFT JOIN) -- reservation_room_stays.confirmation_number = reservation_taxes_fees.confirmation_number (INNER JOIN) -- reservation_taxes_fees.reservation_id can be joined with reservation_room_stays.reservation_id (JOIN) -- reservation_room_stays.room_moved_from can be joined with reservation_room_stays.confirmation_number (JOIN) -- reservation_room_stays.room_moved_from can be joined with reservation_room_stays.confirmation_number (SELF JOIN) -- reservation_customer_info.reservation_id can be joined with reservation_room_stays.reservation_id (SUBQUERY JOIN) -- reservation_room_stays.confirmation_number can be joined with reservation_room_stays.room_moved_to (SUBQUERY JOIN) -- reservation_room_stays.room_confirmation_number can be joined with reservation_room_stays.confirmation_number (SELF JOIN) -- reservation_customer_info.confirmation_number can be joined with reservation_room_stays.confirmation_number (SUBQUERY JOIN) -- reservation_comments_requests.confirmation_number can be joined with reservation_room_stays.confirmation_number (LEFT JOIN) -- reservation_room_stays.confirmation_number can be joined with reservation_payment_installments.confirmation_number (LEFT JOIN)