UPDATE booking_config SET config_value = '-1' WHERE config_name = 'calendar_month_limit_past' AND config_value='0';

UPDATE booking_config SET config_value = '-1' WHERE config_name = 'calendar_month_limit_future' AND config_value='0';

ALTER TABLE `booking_calendars` ADD `category_id` INT NOT NULL AFTER `calendar_id` ;

ALTER TABLE `booking_calendars` ADD `calendar_email` VARCHAR(255) NOT NULL AFTER `calendar_title` ;

CREATE TABLE `booking_categories` (
  `category_id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) NOT NULL,
  `category_order` int(11) NOT NULL,
  `category_active` int(11) NOT NULL,
  PRIMARY KEY (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `booking_categories`(`category_id`, `category_name`, `category_order`, `category_active`) VALUES(1,'default category',0,1);

UPDATE `booking_calendars` SET category_id = 1;


INSERT INTO `booking_config` ( `config_name`, `config_value`)
VALUES 	('form_bg','#567BD2'),
	('day_white_line2_color_hover','#FFFFFF'),
	('day_white_line2_color','#00CC33'),
	('day_white_line1_color_hover','#FFFFFF'),
	('day_white_line1_color','#999999'),
	('day_black_line2_color_hover','#FFFFFF'),
	('day_white_line2_disabled_color','#CCCCCC'),
	('day_black_line2_color','#FFFFFF'),
	('day_black_line1_color_hover','#FFFFFF'),
	('day_black_line1_color','#FFFFFF'),
	('day_white_line1_disabled_color','#CCCCCC'),
	('day_black_bg_hover','#567BD2'),
	('day_black_bg','#333333'),
	('day_white_bg_hover','#567BD2'),
	('day_white_bg','#FFFFFF'),
	('day_grey_bg','#F6F6F6'),
	('form_color','#FFFFFF'),
	('recaptcha_style','white'),
	('day_red_bg','#D74E4E'),
	('day_red_line1_color','#FFFFFF'),
	('day_red_line2_color','#FFFFFF'),
	('day_white_bg_disabled','#FFFFFF'),
	('show_category_selection','0'),
	('show_first_filled_month','0'),
	('show_slots_seats','0'),
	('book_now_button_bg','#333333'),
	('book_now_button_color','#FFFFFF'),
	('field_input_bg','#FFFFFF'),
	('field_input_color','#000000'),
	('day_names_color','#666666'),
	('month_name_color','#FFFFFF'),
	('year_name_color','#999999'),
	('month_container_bg','#333333'),
	('month_navigation_button_bg','#333333'),
	('book_now_button_bg_hover','#00CC66'),
	('month_navigation_button_bg_hover','#567BD2'),
	('clear_button_bg','#999999'),
	('clear_button_bg_hover','#333333'),
	('clear_button_color','#FFFFFF'),
	('clear_button_color_hover','#FFFFFF'),
	('book_now_button_color_hover','#FFFFFF'),
	('form_calendar_name_color','#567BD2');


ALTER TABLE `booking_reservation` ADD `admin_confirmed_cancelled` INT NOT NULL AFTER `calendar_id` ;
ALTER TABLE `booking_slots` ADD `slot_av_max` INT NOT NULL AFTER `slot_av` ;
UPDATE booking_slots SET slot_av_max = slot_av WHERE slot_av>0 AND slot_av_max = 0;
CREATE TABLE `booking_pages` (
  `page_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `page_type` char(1) NOT NULL DEFAULT '' COMMENT '''a'' or ''p'' (admin/public)',
  `page_name` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`page_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;





CREATE TABLE `booking_texts` (
  `text_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `page_id` int(11) NOT NULL,
  `text_label` varchar(255) NOT NULL DEFAULT '',
  `text_value` text NOT NULL,
  PRIMARY KEY (`text_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






UPDATE `booking_timezones` SET `timezone_name` = 'Europe/Athens GMT 2.00', `timezone_value`='Europe/Athens' WHERE `timezone_name` = 'Europe/Minsk GMT 2.00';
