# noinspection SqlNoDataSourceInspectionForFile

#
# Add new pages
#


# Remove the old page that combined etiquette with faqs
DELETE FROM `page` where `name` = '/plan-your-visit/racecourse-etiquette-and-faqs/';

# Insert new page: faqs
INSERT INTO `page` (`site_id`, `image_id`, `title`, `name`, `description`, `cache`, `parent_page_id`, `previous_page_id`, `next_page_id`, `sitemap_priority`, `sitemap_frequency`, `sitemap_lastmod`, `menu_order`, `include_on_menu`)
VALUES
	(1, NULL, 'Frequently Asked Qustions', '/plan-your-visit/frequently-asked-questions/', 'Frequently Asked Questions', '<?xml version=\"1.0\" encoding=\"utf8\"?>\n<!DOCTYPE content [\n        <!ELEMENT content (module)*>\n        <!ELEMENT module (#PCDATA)>\n        <!ATTLIST module key CDATA #REQUIRED>\n        <!ATTLIST module type CDATA #REQUIRED>\n        ]>\n<content>\n    <module key=\"5c45e9bb-3f88-440a-ae7c-516693eef0ae\" type=\"meta-data\">\n        <![CDATA[{\"template_name\":\"meta-data\",\"data\":{\"meta_data\":{\"description\":\"Plan your visit with our frequently asked questions and etiquette guide, including what to wear to a raceday and details on tickets, betting and information on our various enclosures. \",\"keywords\":\"Wolverhampton horse races, Wolverhampton race fixtures, Wolverhampton races, days out in the West Midlands England, Wolverhampton horse racing, Wolverhampton race meeting, Wolverhampton race results, Wolverhampton racecourse, horse racing in Wolverhampton, Wolverhampton racing, horse racing days out, racecourse membership, horseracing corporate hospitality, todays horse racing, horse racing fixtures, horse racing courses, horse racing dates, racing days out, horse courses, race sponsorship at Wolverhampton\"}}}]]></module>\n    <module key=\"fc212a9d-16a1-428c-bc72-2a7926da6024\" type=\"hero\">\n        <![CDATA[{\"template_name\":\"template-main\",\"data\":{\"header\":{\"text\":\"Hero\"},\"desc\":{\"text\":\"This is a hero block!\"},\"hero\":{\"filename\":\"wolverhampton-racecourse-etiquette-hero.jpg\",\"id\":\"359\"},\"cta\":{\"label\":\"Find out More\",\"target\":\"_blank\",\"url\":\"http:\\/\\/www.google.co.uk\"}}}]]></module>\n    <module key=\"54bd5d26-1827-470c-a657-c3f9ce0be5a7\" type=\"paragraph\">\n        <![CDATA[{\"template_name\":\"paragraph\",\"data\":{\"paragraph\":{\"text\":\"<h4 class=\\\"paragraph-block-text\\\"><strong>Can I bring my own food &amp; drink?<\\/strong><\\/h4>\\n<p>Please note, you cannot bring food and drink into the racecourse. There are various outlets around the racecourse catering to different tastes where you are able to get food and drink.&nbsp;<\\/p>\\n<h4><strong>Can I bring a dog?<\\/strong><\\/h4>\\n<p>With the exception of Guide Dogs of the Blind, dogs are not permitted to enter the racecourse. In the interests of animal welfare, no dogs are permitted to be left in cars and Wolverhampton Racecourse politely request that all dogs are left at home.&nbsp;<\\/p>\\n<h4><strong>What are the differences between Enclosures?<\\/strong><\\/h4>\\n<p><strong>Grandstand Enclosure&nbsp;<\\/strong><\\/p>\\n<p>This is our general entry admission and offers access to our ground floor only, offering various bars and eating outlets. Wolverhampton Racecourse is a really special experience in that you are close to all the action, horses and jockeys. Grandstand &amp; Premier enclosures offer Grandstand viewing of the live action supported with a big screen.<\\/p>\\n<p><strong>Premier Enclosure&nbsp;<\\/strong><\\/p>\\n<p>This is an exclusive private lounge situated on the first floor of the main building overlooking the track and Winner&rsquo;s Enclosure. Comfortable seating, full bar and menu available in this enclosure. Grandstand &amp; Premier enclosures offer Grandstand viewing of the live action supported with a big screen.<\\/p>\\n<p><strong>Betting Facilities<\\/strong><\\/p>\\n<p>All enclosures have TOTE and Ladbrokes betting facilities. The Boards and rails bookmakers can be found outside in front of the track. If the weather is inclement, the Boards bookmakers may be found inside the concourse.<\\/p>\\n<p><strong>If you\'re looking for a winner in the paddock then a few things to watch out for might include:<\\/strong><\\/p>\\n<ul>\\n<li>A sleek and shiny coat: that\'s normally an indication of a horse\'s well-being.<\\/li>\\n<li>A swagger or elegance; even at the parade ring, a horse\'s athleticism is evident.<\\/li>\\n<li>A relaxed horse is one that is not wasting nervous energy before the race, so if a horse is sweating or uneasy in the paddock, that\'s not usually a good sign.<\\/li>\\n<\\/ul>\\n<p>Well-toned muscle and just a hint of rib showing is a sign that the horse is in peak physical condition; as with most human runners, sprinters tends to carry a little more muscle (and have quite big backsides!) compared to a horse that runs over longer distances, so bear that in mind.<\\/p>\\n<h4><strong>Do I have to book tickets in advance?&nbsp;<\\/strong>&nbsp;<\\/h4>\\n<p>Advance booking is recommended for all fixtures and saves you money. It is cheaper to book in advance, online than purchasing at the gate. &nbsp;Tickets may be purchased on the day of the fixture.&nbsp;Wright Package and Hospitality packages do require advance booking.<\\/p>\\n<h4><strong>Do you provide any concessions for carers &amp; disabled people?&nbsp;<\\/strong><\\/h4>\\n<p>Our venue is accessible to all guests and we make every effort to ensure our guests with disabilities are accommodated to ensure a memorable and fun experience.<\\/p>\\n<p>If you are a disabled visitor and require a carer to attend the event with you, it may be possible to claim a discounted or complimentary ticket for the carer. This can differ for each fixture and\\/or event, so please check with the sales advisor when you make your booking. They may ask questions to ascertain the nature of your disability to ensure you are offered the best possible seating and eligibility for a carer ticket.<\\/p>\\n<p>Please inform us at the time of booking if you need a wheelchair space or have any special requirements, so that we can&nbsp;ensure this is taken care of before you arrive.<\\/p>\\n<p class=\\\"MsoNormal\\\" style=\\\"line-height: 20.55pt;\\\">For our outdoor Music Live, general and bonfire events, a designated viewing area is allocated.&nbsp; As with other areas in the venue bookings are subject to availability.<\\/p>\\n<p class=\\\"MsoNormal\\\" style=\\\"mso-margin-top-alt: auto; margin-bottom: 20.55pt; line-height: 20.55pt;\\\">Please note only one carer can accompany a disabled guest into the designated area (discretion will be applied where children are also in attendance).&nbsp;.<\\/p>\\n<h4><strong>Do children need tickets \\/ have to pay?<\\/strong><\\/h4>\\n<p>Accompanied under 18\'s are admitted FREE of charge to both the Grandstand and Premier Enclosures. For restaurant prices please call us on 01902 390011.<\\/p>\\n<h4><strong>What time do gates open on a race day?<\\/strong><\\/h4>\\n<p>Gates open two hours prior to the first race. Please check the fixture of your choice for the latest times and information.&nbsp;<\\/p>\\n<h4><strong>Do I have to pay for parking?<\\/strong><\\/h4>\\n<p>No, we have 1500 FREE parking spaces.&nbsp;<\\/p>\\n<h4><strong>Ladies Evening<\\/strong><\\/h4>\\n<p>For our Ladies Evening we encourage smart dress. This usually means dresses or suits and hats for ladies and a suit and tie for gentlemen. There are competitions for the Best Dressed Lady and Best Hat.&nbsp;<\\/p>\\n<h4><strong>Can I take photographs?<\\/strong><\\/h4>\\n<p>At all meetings we ask you to ensure that no flash photography takes place near the horses. Otherwise you are welcome to take photographs for personal non-commercial use only. During live music and entertainment, the artists&rsquo; management retain all image rights. Any photographer that is felt to be impeding or contravening these rights without accreditation and prior written consent will be requested to leave and escorted from the premises. You cannot take images for commercial purposes without prior permission from the racecourse office and provision of press accreditation. Live streaming of pictures via any method for any purpose is not permitted at Wolverhampton Racecourse.&nbsp;<\\/p>\\n<h4><strong>Note<\\/strong><\\/h4>\\n<p>Professional filming and photography takes place here at Wolverhampton for various publications and broadcasting and race goers (including families) consent to being filmed, photographed and otherwise recorded by Wolverhampton Racecourse or any third party authorised by Wolverhampton Racecourse. You grant Wolverhampton Racecourse and any third party authorised by Wolverhampton Racecourse the right to broadcast, publish, licence and use any photographs, film, recordings or images of you without payment or other compensation in any promotional literature produced by Wolverhampton Racecourse. Full copies of our Terms &amp; Conditions are available upon request.<\\/p>\"},\"image50\":{\"filename\":\"Checkout.png\"}}}]]></module>\n    <module key=\"f3e0e8b5-32d6-4069-82c2-acb414edfe53\" type=\"form\">\n        {\"template_name\":\"newsletter\"}\n    </module>\n</content>\n', 56, 60, 60, 0.9, 'yearly', NULL, 3, 1);

SET @faqId = LAST_INSERT_ID();

# Insert new page: etiquette
INSERT INTO `page` (`site_id`, `image_id`, `title`, `name`, `description`, `cache`, `parent_page_id`, `previous_page_id`, `next_page_id`, `sitemap_priority`, `sitemap_frequency`, `sitemap_lastmod`, `menu_order`, `include_on_menu`)
VALUES
  (1, NULL, 'Racecourse Etiquette & FAQ\'s', '/plan-your-visit/racecourse-etiquette/', 'Racecourse Etiquette', '<?xml version=\"1.0\" encoding=\"utf8\"?>\n<!DOCTYPE content [\n        <!ELEMENT content (module)*>\n        <!ELEMENT module (#PCDATA)>\n        <!ATTLIST module key CDATA #REQUIRED>\n        <!ATTLIST module type CDATA #REQUIRED>\n        ]>\n<content>\n    <module key=\"5c45e9bb-3f88-440a-ae7c-516693eef0ae\" type=\"meta-data\">\n        <![CDATA[{\"template_name\":\"meta-data\",\"data\":{\"meta_data\":{\"description\":\"Plan your visit with our frequently asked questions and etiquette guide, including what to wear to a raceday and details on tickets, betting and information on our various enclosures. \",\"keywords\":\"Wolverhampton horse races, Wolverhampton race fixtures, Wolverhampton races, days out in the West Midlands England, Wolverhampton horse racing, Wolverhampton race meeting, Wolverhampton race results, Wolverhampton racecourse, horse racing in Wolverhampton, Wolverhampton racing, horse racing days out, racecourse membership, horseracing corporate hospitality, todays horse racing, horse racing fixtures, horse racing courses, horse racing dates, racing days out, horse courses, race sponsorship at Wolverhampton\"}}}]]></module>\n    <module key=\"fc212a9d-16a1-428c-bc72-2a7926da6024\" type=\"hero\">\n        <![CDATA[{\"template_name\":\"template-main\",\"data\":{\"header\":{\"text\":\"Hero\"},\"desc\":{\"text\":\"This is a hero block!\"},\"hero\":{\"filename\":\"wolverhampton-racecourse-etiquette-hero.jpg\",\"id\":\"359\"},\"cta\":{\"label\":\"Find out More\",\"target\":\"_blank\",\"url\":\"http:\\/\\/www.google.co.uk\"}}}]]></module>\n    <module key=\"d82610d0-52df-40ec-ac65-c0645caa7d6c\" type=\"paragraph\">\n        <![CDATA[{\"template_name\":\"paragraph-img-50-right\",\"data\":{\"paragraph\":{\"text\":\"<div>\\n<h4><strong>What to Wear<\\/strong><\\/h4>\\n<p>The dress code in our private hospitality suites, restaurants and Premier Enclosure is smart casual. Smart jeans are acceptable. However sports shirts, offensive t-shirts, ripped jeans and casual shorts are not permitted. Management reserves the right to deny entry if dressed inappropriately.<\\/p>\\n<p>In our Grandstand, our dress code is casual. However, offensive t-shirts will not be permitted.<\\/p>\\n<h4><strong>Feature Race Days<\\/strong><\\/h4>\\n<p>On our feature race days, for example Ladies Day and Gentleman&rsquo;s Day, race-goers enjoy dressing smartly for the occasion and on Ladies Day many Ladies choose to wear hats - which although not obligatory, is still great fun!<\\/p>\\n<p>&nbsp;<\\/p>\\n<\\/div>\"},\"image50\":{\"filename\":\"wolverhampton-racecourse-image-50-etiquette.jpg\",\"id\":\"355\"}}}]]></module>\n    <module key=\"a7dc1205-b8af-4b69-bf68-2e63158cfe8e\" type=\"trio-image\">\n        <![CDATA[{\"template_name\":\"template-1\",\"data\":{\"imageleft\":{\"filename\":\"wovlverhampton-racecourse-trio-image-left-etiquette.jpg\",\"id\":\"356\"},\"imagecenter\":{\"filename\":\"wolverhampton-racecourse-etiqutte-trio-image-centre.jpg\",\"id\":\"357\"},\"imageright\":{\"filename\":\"wolverhampton-racecourse-trio-image-right-etiquette.jpg\",\"id\":\"358\"}}}]]></module>\n    <module key=\"f3e0e8b5-32d6-4069-82c2-acb414edfe53\" type=\"form\">\n        {\"template_name\":\"newsletter\"}\n    </module>\n</content>\n', 56, 60, 60, 0.9, 'yearly', NULL, 3, 1);

SET @etiquetteId = LAST_INSERT_ID();



# Update main menu to support new pages
UPDATE `site_global`
SET `data` = '{\n  \"template\": {\n    \"name\": \"light\"\n  },\n  \"menus\" : [\n    {\n      \"title\": \"Plan Your Visit\",\n      \"menu\": \"plan-your-visit\",\n      \"slug\": \"/plan-your-visit/\",\n\n      \"columns\": [\n\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Plan Your Visit\",\n              \"slug\": \"/plan-your-visit/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Food & Drink\",\n              \"slug\": \"/plan-your-visit/food-and-drink/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Racecourse Etiquette\",\n              \"slug\": \"/plan-your-visit/racecourse-etiquette/\"\n            }\n\n          ]\n        },\n\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Frequently Asked Question\",\n              \"slug\": \"/plan-your-visit/frequently-asked-questions/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Venue Accessibility\",\n              \"slug\": \"/plan-your-visit/venue-accessibility/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Guide To Betting\",\n              \"slug\": \"/plan-your-visit/guide-to-betting/\"\n            }\n          ]\n        },\n\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Stay With Us\",\n              \"slug\": \"/plan-your-visit/stay-with-us/\"\n            }\n          ]\n        }\n\n      ]\n    },\n\n    {\n      \"title\": \"Hospitality\",\n      \"menu\": \"hospitality\",\n      \"slug\": \"/hospitality/\",\n\n      \"columns\": [\n\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Hospitality\",\n              \"slug\": \"/hospitality/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Sponsorship & Hospitality\",\n              \"slug\": \"/hospitality/sponsorship-and-hospitality/\"\n            }\n\n          ]\n        },\n\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Horizons Restaurant\",\n              \"slug\": \"/hospitality/horizons-restaurant/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"EBC Technology Suite\",\n              \"slug\": \"/hospitality/ebc-technology-suite/\"\n            }\n\n\n          ]\n        }\n\n\n\n      ]\n\n    },\n\n    {\n      \"title\": \"Hire Our Venue\",\n      \"menu\": \"hire-our-venue\",\n      \"slug\": \"/hire-our-venue/\",\n\n      \"columns\": [\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Hire Our Venue\",\n              \"slug\": \"/hire-our-venue/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Conferences Meetings & Events\",\n              \"slug\": \"/hire-our-venue/conferences-meetings-and-events/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Conferences & Meetings\",\n              \"slug\": \"/hire-our-venue/conferences-meetings-and-events/conferences-and-meetings/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Exhibitions\",\n              \"slug\": \"/hire-our-venue/conferences-meetings-and-events/exhibitions/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Product Launches\",\n              \"slug\": \"/hire-our-venue/conferences-meetings-and-events/product-launches/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Charity Events\",\n              \"slug\": \"/hire-our-venue/conferences-meetings-and-events/charity-events/\"\n            }\n\n          ]\n        },\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Outdoor Events\",\n              \"slug\": \"/hire-our-venue/outdoor-events/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Parties & Dinners\",\n              \"slug\": \"/hire-our-venue/parties-and-dinners/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Banquets & Awards\",\n              \"slug\": \"/hire-our-venue/parties-and-dinners/banquets-and-awards/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Proms & Graduations\",\n              \"slug\": \"/hire-our-venue/parties-and-dinners/proms-and-gradutations/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Private Parties\",\n              \"slug\": \"/hire-our-venue/parties-and-dinners/private-parties/\"\n            }\n\n          ]\n        },\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Christmas & New Year\",\n              \"slug\": \"/hire-our-venue/christmas-and-new-year/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Weddings\",\n              \"slug\": \"/hire-our-venue/weddings/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Funerals & Wakes\",\n              \"slug\": \"/hire-our-venue/funerals-and-wakes/\"\n            }\n          ]\n        }\n\n      ]\n    },\n\n    {\n      \"title\": \"Our Racecourse\",\n      \"menu\": \"our-racecourse\",\n      \"slug\": \"/our-racecourse/\",\n\n      \"columns\": [\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Our Racecourse\",\n              \"slug\": \"/our-racecourse/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Owners & Trainers\",\n              \"slug\": \"/our-racecourse/owners-and-trainers/\"\n            },\n            {\n              \"type\": \"child\",\n              \"title\": \"Equine Welfare\",\n              \"slug\": \"/our-racecourse/owners-and-trainers/equine-welfare/\"\n            }\n\n          ]\n        },\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"About Us\",\n              \"slug\": \"/our-racecourse/about-us/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Annual Membership\",\n              \"slug\": \"/our-racecourse/annual-membership/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"Sponsorship & Partnerships\",\n              \"slug\": \"/our-racecourse/sponsorship-and-partnerships/\"\n            }\n\n          ]\n        },\n        {\n          \"items\": [\n            {\n              \"type\": \"parent\",\n              \"title\": \"Join Our Team\",\n              \"slug\": \"/our-racecourse/join-our-team/\"\n            },\n            {\n              \"type\": \"parent\",\n              \"title\": \"All Weather Championships\",\n              \"slug\": \"/our-racecourse/all-weather-championships/\"\n            }\n          ]\n        }\n\n      ]\n    },\n\n    {\n      \"title\": \"Holiday Inn <br>Hotel\",\n      \"menu\": \"holiday-inn-hotel\",\n      \"url\": \"/holiday-inn-hotel/\"\n    },\n\n    {\n      \"title\": \"Contact Us\",\n      \"menu\": \"contact-us\",\n      \"url\": \"/contact-us/\"\n    }\n\n  ]\n}'
WHERE `label` = 'main_menu';



#
# Update previous and next
#


# Food and drink next page -> Racecourse etiquette
UPDATE `page`
SET `next_page_id` = @etiquetteId
WHERE `name` = '/plan-your-visit/food-and-drink/';

# ID of food and drink page
set @foodAndDrinkId = (SELECT `id` from `page` where `name` = '/plan-your-visit/food-and-drink/');


# Venue accessibility previous page -> Frequently asked questions
UPDATE `page`
SET `previous_page_id` = @faqId
WHERE `name` = '/plan-your-visit/venue-accessibility/';

# ID of venue accessibility page
set @venueAccessibilityId = (SELECT `id` from `page` where `name` = '/plan-your-visit/venue-accessibility/');


# Racecourse etiquette previous page -> Food and drink, next page -> Frequently asked questions
UPDATE `page`
SET `previous_page_id` = @foodAndDrinkId, `next_page_id` = @faqId
WHERE `name` = '/plan-your-visit/racecourse-etiquette/';


# Frequently asked questions previous page -> Racecourse etiquette, next page -> Venue accessibility
UPDATE `page`
SET `previous_page_id` = @etiquetteId, `next_page_id` = @venueAccessibilityId
WHERE `name` = '/plan-your-visit/frequently-asked-questions/';

