CREATE TABLE `pages1` (
  `ID` int UNSIGNED NOT NULL,
  `Language` char(2) 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) 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) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MetaDescription` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MetaImage` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `NoIndex` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `MenuLabel` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `FooterLabel` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ASideLabel` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `URLLabel` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ExternalURL` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `Images` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `Title` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `Annotation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `Content` longtext COLLATE utf8mb4_unicode_ci,
  `AddContent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `AddOn` text COLLATE utf8mb4_unicode_ci,
  `Visible` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


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


--------------------


INSERT INTO `pages1`
SELECT * FROM `pages` WHERE `Language` = 'en' ORDER BY `ID` ASC;


--------------------
-- de|dk|es|fr|it|pl


UPDATE `pages1` SET `Language` = 'de';

INSERT INTO `pages`
SELECT * FROM `pages1`;

UPDATE `pages1` SET `Language` = 'dk';

INSERT INTO `pages`
SELECT * FROM `pages1`;
UPDATE `pages1` SET `Language` = 'es';

INSERT INTO `pages`
SELECT * FROM `pages1`;
UPDATE `pages1` SET `Language` = 'fr';

INSERT INTO `pages`
SELECT * FROM `pages1`;
UPDATE `pages1` SET `Language` = 'it';

INSERT INTO `pages`
SELECT * FROM `pages1`;
UPDATE `pages1` SET `Language` = 'pl';

INSERT INTO `pages`
SELECT * FROM `pages1`;


--------------------


DROP TABLE `pages1`;