CREATE TABLE `pages` (
	`ID` int UNSIGNED NOT NULL,
	`Language` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'bg',
	`ParentID` int UNSIGNED NOT NULL DEFAULT '0',
	`PostDate` date DEFAULT NULL,
	`LastUpdate` datetime DEFAULT NULL,
	`Module` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`Action` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`UploadID` bigint UNSIGNED NOT NULL DEFAULT '0',
	`MetaTitle` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`MetaDescription` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`MetaImage` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`NoIndex` tinyint UNSIGNED NOT NULL DEFAULT '0',
	`MenuLabel` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`FooterLabel` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`URLLabel` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`ExternalURL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`Annotation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`Content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
	`AddContent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
	`AddOn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
	`NoCache` tinyint UNSIGNED NOT NULL DEFAULT '0',
	`Visible` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `pages` ADD PRIMARY KEY (`ID`,`Language`) USING BTREE;

INSERT INTO `pages`
	(`ID`, `Language`, `ParentID`, `PostDate`, `LastUpdate`, `Module`, `Action`, `UploadID`, `MetaTitle`, `MetaDescription`, `MetaImage`, `NoIndex`, `MenuLabel`, `FooterLabel`, `URLLabel`, `Images`, `Title`, `Annotation`, `Content`, `AddContent`, `AddOn`, `NoCache`, `Visible`) VALUES
	(1, 'bg', 0, NOW(), NOW(), 'pages', '', 2127403418, 'Index Meta Title', 'Index Meta Description', NULL, '0', NULL, NULL, 'index', NULL, 'Index', '', 'Index Content', NULL, NULL, 0, 1),
	(1, 'en', 0, NOW(), NOW(), 'pages', '', 2127403418, 'Index Meta Title', 'Index Meta Description', NULL, '0', NULL, NULL, 'index', NULL, 'Index', '', 'Index Content', NULL, NULL, 0, 1);


INSERT INTO `pages`
	(`ID`, `Language`, `ParentID`, `PostDate`, `LastUpdate`, `Module`, `Action`, `UploadID`, `MetaTitle`, `MetaDescription`, `MetaImage`, `NoIndex`, `MenuLabel`, `FooterLabel`, `URLLabel`, `Images`, `Title`, `Annotation`, `Content`, `AddContent`, `AddOn`, `NoCache`, `Visible`) VALUES
	(3, 'bg', 1, NOW(), NOW(), 'terms', '', 2273250200, 'Условия на сайта', 'Условия на сайта описание', NULL, 0, NULL, 'Условия на сайта', 'условия-на-сайта', NULL, 'Условия на сайта', NULL, 'Условия на сайта Съдържание', NULL, NULL, 0, 1),
	(3, 'en', 1, NOW(), NOW(), 'terms', '', 2273250200, 'Terms and Conditions MetaTitle', 'Terms and Conditions MetaDescription', NULL, 0, NULL, 'Terms and Conditions', 'terms-and-conditions', NULL, 'Terms and Conditions', NULL, 'Terms and Conditions Content', NULL, NULL, 0, 1);
