
START TRANSACTION;

ALTER TABLE `bookings` ADD COLUMN `is_bar_needed` tinyint(1) UNSIGNED DEFAULT 0;

ALTER TABLE `is_recurring_booking` ADD COLUMN `is_recurring_booking` tinyint(1) UNSIGNED DEFAULT 0;

ALTER TABLE `recurring_booking_per` ADD COLUMN `recurring_booking_per` VARCHAR(255)  DEFAULT NULL;

ALTER TABLE `recurring_booking_from` ADD COLUMN `recurring_booking_from` VARCHAR(255)  DEFAULT NULL;

ALTER TABLE `recurring_booking_to` ADD COLUMN `recurring_booking_to` VARCHAR(255)  DEFAULT NULL;

ALTER TABLE `calendars_users` ADD COLUMN `room_notes` text DEFAULT NULL;

INSERT INTO `fields` VALUES (NULL, 'front_recurring', 'frontend', 'Front / Additional Fields', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Additional Fields', 'script');


INSERT INTO `fields` VALUES (NULL, 'front_is_recurring_booking', 'frontend', 'Front / Is it recurring booking ?', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Is it recurring booking ?', 'script');


INSERT INTO `fields` VALUES (NULL, 'front_repeat_booking', 'frontend', 'Front / Repeat this booking', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Repeat this booking', 'script');


INSERT INTO `fields` VALUES (NULL, 'front_full_day_book_btn', 'frontend', 'Cart / Book for full day', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Book for full day', 'script');


INSERT INTO `fields` VALUES (NULL, 'front_bar', 'frontend', 'Front / Is bar needed ?', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Is bar needed ?', 'script');


INSERT INTO `fields` VALUES (NULL, 'room_notes', 'backend', 'Calendar / Notes', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Notes', 'script');

INSERT INTO `options` VALUES (0, 'o_show_bar', 3, '1|0::0', NULL, 'bool', 17, 1, NULL);
INSERT INTO `options` VALUES (1, 'o_show_bar', 3, '1|0::0', NULL, 'bool', 17, 1, NULL);
INSERT INTO `options` VALUES (2, 'o_show_bar', 3, '1|0::0', NULL, 'bool', 17, 1, NULL);

INSERT INTO `fields` VALUES (NULL, 'opt_o_show_bar', 'backend', 'Options / Show Bar', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Show Bar', 'script');



INSERT INTO `fields` VALUES (NULL, 'booking_bar', 'backend', 'Bookings / Bar', 'script', NULL);

SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjBaseField', 1, 'title', 'Bar', 'script');

COMMIT;