DROP TABLE IF EXISTS `site_core_layouts`;
CREATE TABLE `site_core_layouts` (
  `layout_id` int(11) NOT NULL AUTO_INCREMENT,
  `layout_status` int(1) NOT NULL,
  `layout_parent` int(11) NOT NULL DEFAULT '0',
  `layout_order` int(11) NOT NULL DEFAULT '0',
  `layout_name` varchar(255) NOT NULL,
  `layout_generic` int(1) NOT NULL,
  `layout_columns` int(2) NOT NULL,
  `layout_device` varchar(20) NOT NULL DEFAULT '',
  `layout_c1` int(2) NOT NULL,
  `layout_c1_lg` int(2) NOT NULL,
  `layout_c1_md` int(2) NOT NULL,
  `layout_c1_sm` int(2) NOT NULL,
  `layout_c1_xs` int(2) NOT NULL,
  `layout_c2` int(2) NOT NULL,
  `layout_c2_lg` int(2) NOT NULL,
  `layout_c2_md` int(2) NOT NULL,
  `layout_c2_sm` int(2) NOT NULL,
  `layout_c2_xs` int(2) NOT NULL,
  `layout_c3` int(2) NOT NULL,
  `layout_c3_lg` int(2) NOT NULL,
  `layout_c3_md` int(2) NOT NULL,
  `layout_c3_sm` int(2) NOT NULL,
  `layout_c3_xs` int(2) NOT NULL,
  `layout_c4` int(2) NOT NULL,
  `layout_c4_lg` int(2) NOT NULL,
  `layout_c4_md` int(2) NOT NULL,
  `layout_c4_sm` int(2) NOT NULL,
  `layout_c4_xs` int(2) NOT NULL,
  `layout_c5` int(2) NOT NULL,
  `layout_c5_lg` int(2) NOT NULL,
  `layout_c5_md` int(2) NOT NULL,
  `layout_c5_sm` int(2) NOT NULL,
  `layout_c5_xs` int(2) NOT NULL,
  `layout_c6` int(2) NOT NULL,
  `layout_c6_lg` int(2) NOT NULL,
  `layout_c6_md` int(2) NOT NULL,
  `layout_c6_sm` int(2) NOT NULL,
  `layout_c6_xs` int(2) NOT NULL,
  `layout_template` varchar(255) NOT NULL,
  `layout_system` int(1) NOT NULL DEFAULT 0,
  `layout_bg` int(1) NOT NULL,
  `layout_bg_style` int(1) NOT NULL,
  `layout_extra_css` int(1) NOT NULL,
  `layout_has_tablet` int(1) NOT NULL,
  `layout_has_mobile` int(1) NOT NULL,
  `layout_height` int(1) NOT NULL,
  `layout_height_custom` int(5) NOT NULL,
  `layout_height_dim` varchar(5) NOT NULL,
  `layout_align` int(1) NOT NULL,
  `layout_css` varchar(200) NOT NULL,
  `layout_css_1` varchar(200) NOT NULL,
  `layout_css_2` varchar(200) NOT NULL,
  `layout_css_3` varchar(200) NOT NULL,
  `layout_css_4` varchar(200) NOT NULL,
  `layout_css_5` varchar(200) NOT NULL,
  `layout_css_6` varchar(200) NOT NULL,
  `layout_extra_bg` int(1) NOT NULL,
  `layout_bg_1` int(11) NOT NULL,
  `layout_bg_2` int(11) NOT NULL,
  `layout_bg_3` int(11) NOT NULL,
  `layout_bg_4` int(11) NOT NULL,
  `layout_bg_5` int(11) NOT NULL,
  `layout_bg_6` int(11) NOT NULL,
  `layout_bg_lib` int(11) NOT NULL,
  `layout_bg_margin_top` varchar(30) NOT NULL,
  `layout_bg_margin_bottom` varchar(30) NOT NULL,
  `layout_fp` int(1) NOT NULL,
  `layout_fp_menu` varchar(30) NOT NULL,
  PRIMARY KEY (`layout_id`),
  KEY `layout_parent` (`layout_parent`),
  KEY `layout_order` (`layout_order`),
  KEY `layout_device` (`layout_device`),
  KEY `layout_status` (`layout_status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `site_core_layouts_items`;
CREATE TABLE `site_core_layouts_items` (
  `layitem_id` int(11) NOT NULL AUTO_INCREMENT,
  `layitem_order` int(11) NOT NULL,
  `layitem_layout` int(11) NOT NULL,
  `layitem_widget` int(11) NOT NULL,
  `layitem_column` int(11) NOT NULL,
  PRIMARY KEY (`layitem_id`),
  KEY `layitem_order` (`layitem_order`,`layitem_layout`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


INSERT INTO `site_core_layouts` (`layout_id`, `layout_parent`, `layout_order`, `layout_name`, `layout_generic`, `layout_columns`, `layout_device`, `layout_c1`, `layout_c1_md`, `layout_c1_sm`, `layout_c1_xs`, `layout_c2`, `layout_c2_md`, `layout_c2_sm`, `layout_c2_xs`, `layout_c3`, `layout_c3_md`, `layout_c3_sm`, `layout_c3_xs`, `layout_c4`, `layout_c4_md`, `layout_c4_sm`, `layout_c4_xs`, `layout_c5`, `layout_c5_md`, `layout_c5_sm`, `layout_c5_xs`, `layout_c6`, `layout_c6_md`, `layout_c6_sm`, `layout_c6_xs`, `layout_template`, `layout_system`, `layout_bg`, `layout_bg_style`, `layout_extra_css`, `layout_has_tablet`, `layout_has_mobile`, `layout_height`, `layout_css`, `layout_extra_bg`, `layout_bg_1`, `layout_bg_2`, `layout_bg_3`, `layout_bg_4`, `layout_bg_5`, `layout_bg_6`, `layout_bg_lib` , `layout_status`) VALUES
(1,	0,	0,	'Preinstalled Module Layout (Public)',	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	'1',	1,	0,	0,	0,	0,	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	0 ,1 ),
(2,	0,	0,	'Preinstalled Footer Layout',	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	0,	'2',	1,	0,	0,	0,	0,	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	0 , 1),
(4,	1,	4,	'',	0,	1,	'',	12,	12,	12,	12,	1,	0,	0,	0,	1,	0,	0,	0,	1,	0,	0,	0,	1,	0,	0,	0,	1,	0,	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	'',	0,	0,	0,	0,	0,	0,	0,	0 , 1);

INSERT INTO `site_core_layouts_items` (`layitem_id`, `layitem_order`, `layitem_layout`, `layitem_widget`, `layitem_column`) VALUES
(1,	1,	4,	-1,	1),
(2,	2,	5,	-1,	1);
