<?php
$db_update['indizies'][5]['content_levels'] = "
ALTER TABLE `content_levels` ADD UNIQUE(`language`, `url`);";

$db_update['data'][6]['content_templates'] = "
ALTER TABLE `content_templates` CHANGE `title` `label` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;";


$db_update['structure'][10]['content_links'] = "
CREATE TABLE `content_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_module` int(11) DEFAULT NULL,
  `sortorder` int(11) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `linktext` text DEFAULT NULL,
  PRIMARY KEY (`id`), KEY `id_module` (`id_module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";



$db_update['data'][10]['content_options'] = "INSERT IGNORE INTO `content_options` (`c_public`, `title`, `value`) VALUES ('1', 'c_links', '1');";

$db_update['data'][10]['content_labels'] = "INSERT IGNORE INTO `content_labels` (`c_active`, `language`, `label`, `text`) VALUES ('1', 'de', 'LABEL_LINKS', 'Links');";
$db_update['data'][12]['content_labels'] = "DELETE FROM `content_labels` WHERE label = 'LABEL_LINKS';";

$db_update['data'][14]['content_levels'] = "
ALTER TABLE `content_levels` ADD `meta_title` VARCHAR(255) NULL DEFAULT NULL AFTER `linktext`, 
ADD `meta_description` TEXT NULL DEFAULT NULL AFTER `meta_title`;";


$db_update['data'][17]['content_images'] = "
ALTER TABLE `content_images` ADD `title` VARCHAR(255) NULL DEFAULT NULL AFTER `sortorder`, ADD `alt` VARCHAR(255) NULL DEFAULT NULL AFTER `title`, 
ADD `photographer` VARCHAR(255) NULL DEFAULT NULL AFTER `alt`;";

$db_update['data'][19]['content_options'] = "UPDATE `content_options` SET `value` = '1' WHERE `title` = 'c_modules';";

$db_update['data'][20]['content_options'] = "ALTER TABLE `content_options` ADD UNIQUE(`title`);";


$db_update['data']['1.0.3']['content'] = "ALTER TABLE `content` ADD `class` VARCHAR(255) NULL DEFAULT NULL AFTER `linktext`;";
$db_update['data']['1.0.3']['content_levels'] = "ALTER TABLE `content_levels` ADD `class` VARCHAR(255) NULL DEFAULT NULL AFTER `linktext`;";


$db_update['data']['1.0.4']['content_options'] = "
INSERT IGNORE INTO`content_options` (`c_public`, `title`, `value`) VALUES
('1', 'c_period', '0');";


$db_update['data']['1.0.5']['content_images'] = "
ALTER TABLE `content_images` ADD `link` VARCHAR(255) NULL DEFAULT NULL AFTER `copyright`, ADD `linktext` TEXT NULL DEFAULT NULL AFTER `link`;";
