
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_name', 'COMPANY', '', 'Firmenname');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_legal_form', 'COMPANY', '', 'Rechtsform');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_ustid', 'COMPANY', '', 'USt-IdNr.');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_jurisdiction', 'COMPANY', '', 'Gerichtsstand');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_management', 'COMPANY', '', ' Geschäftführung');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_director', 'COMPANY', '', 'Vorstand');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_directorat', 'COMPANY', '', 'Aufsichtsratsvorsitz');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_register_court', 'COMPANY', '', 'Sitz, Registergericht, Registernummer');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_data_protection_officer', 'COMPANY', '', ' Datenschutzbeauftragte');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_youth_protection_officer', 'COMPANY', '', 'Jugendschutzbeauftragte');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_country', 'COMPANY', '', 'Land');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_street', 'COMPANY', '', 'Straße');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_zip_code', 'COMPANY', '', 'PLZ');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_city', 'COMPANY', '', 'Ort');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_email', 'COMPANY', '', 'E-Mail');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_phone', 'COMPANY', '', 'Telefon');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_fax', 'COMPANY', '', 'Fax');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_website', 'COMPANY', '', 'Webseite');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_bank', 'COMPANY', '', 'Bank');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_bank_number', 'COMPANY', '', 'BLZ');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_account_number', 'COMPANY', '', 'Kto-Nr.');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_iban', 'COMPANY', '', 'IBAN');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('company_swift_bic', 'COMPANY', '', 'SWIFT / BIC');

DROP TABLE `words`;
CREATE TABLE IF NOT EXISTS `text_translation` (
  `var_id` varchar(255) NOT NULL,
  `modul` varchar(255) NOT NULL,
  `text` varchar(255) NOT NULL,
  `text_en` varchar(255) NOT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `currency` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `iso` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `domains` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `google_site_verification` varchar(255) NOT NULL,
  `google_analytics_code` varchar(255) NOT NULL,
  `standard_theme_id` int(11) NOT NULL,
  `standard_language_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_image_size_zoom', 'ITEM', '800', 'Artikel Bildgröße bei Zoom');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_image_size_overview', 'ITEM', '150', 'Artikel Bildgröße bei der Artikelliste');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_image_size_thumb', 'ITEM', '90', 'Artikel Bildgröße für Thumbnails');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_image_size_details', 'ITEM', '330', 'Artikel Bildgröße in der Detailansicht');
INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_image_size_detaildefault', 'ITEM', '245', 'Artikel Bildgröße in der standard Detailansicht');

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('show_child_items', 'ITEM', '0', 'Zeige Kinderartikel in der Artikelverwaltung.');

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_customer_opinion', 'ITEM', '0', 'Zeige Artikelbewertung in der Artikeldetailansicht.');

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('default_system_language', 'SYSTEM', 'de', 'Standardsprache des Systems in ISO631-1 (deutsch = de).');

CREATE TABLE IF NOT EXISTS `order_dhl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_number` varchar(255) NOT NULL,
  `verfahren` int(11) NOT NULL,
  `produkt` int(11) NOT NULL,
  `services` int(11) NOT NULL,
  `gewicht` varchar(255) NOT NULL,
  `teilnahme` varchar(255) NOT NULL,
  `zollinhaltserklaerung` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('show_item_item_assign2', 'ITEM', '1', 'Zeige Ersatzteile bei Artikel an.');

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('item_list_filter_max_inventory', 'ITEM', '0', 'Spezieller Artikelfilter mit maximaler Lagerbestandszahl.');

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('main_menu_item_clickable', 'SITE_WIDGETS', '1', 'Hauptmenüpunkte sind klickbar');

CREATE TABLE IF NOT EXISTS `bills` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` varchar(255) NOT NULL,
  `bill_date` date,
  `state_id` tinyint(4) NOT NULL,
  `payment_date` date,
  `payment_state` tinyint(4) NOT NULL,
  `customer` varchar(255) NOT NULL,
  `amount_brutto` DECIMAL( 9, 4 ) NOT NULL,
  `open_amount` DECIMAL( 9, 4 ) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `return_goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `return_date` date,
  `state_id` tinyint(4) NOT NULL,
  `customer` varchar(255) NOT NULL,
  `amount_brutto` DECIMAL( 9, 4 ) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('show_shoppingcart_different_items_sum', 'shoppingcart', '0', 'Zeige die Anzahl der unterschiedlichen Artikel an und nicht die Gesamtsumme der Artikel.');

ALTER TABLE `site_content` ADD `style` VARCHAR( 255 ) NOT NULL AFTER `activ`;
UPDATE site_content SET style='h1';

ALTER TABLE `structure` ADD `sitemap_activ` tinyint(4) NOT NULL;

ALTER TABLE `customer_addresses` ADD `freetextfield1` varchar(255) DEFAULT NULL;
ALTER TABLE `customer_addresses` ADD `freetextfield2` varchar(255) DEFAULT NULL;
ALTER TABLE `customer_addresses` ADD `freetextfield3` varchar(255) DEFAULT NULL;
ALTER TABLE `customer_addresses` ADD `freetextfield4` varchar(255) DEFAULT NULL;

ALTER TABLE `customer_groups`  ADD COLUMN `customer_number_edit` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' AFTER `verification_type`;

ALTER TABLE `customers`  ADD COLUMN `skonto` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0';

ALTER TABLE `countries`  ADD COLUMN `customer_ust_id_required` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0';

INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('guest_order_customer_id', 'text', 'SHOP_SETTINGS', '0', 0, 'Kunden-ID für die Gastbestellung.');


INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('cashdesk_giftcertificate', 'text', 'CASHDESK', '0', 0, 'Gutscheincode beim Kassengang (1 = an, 0 = aus).');

INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('item_search_not_found_text', 'formated', 'SHOP_TEXT', 'Für den Suchbegriff "[#search_word]" wurden keine Treffer in unserer Datenbank gefunden.', 1, 'Text für die Artikelsuche wenn keine gefunden wurden.');

ALTER TABLE `structure` ADD `item_type` int(11) NOT NULL DEFAULT '0';

ALTER TABLE `structure` ADD `customer_group` int(11) NOT NULL DEFAULT '0';

INSERT INTO `payment_methods` (
`id` ,
`name` ,
`module` ,
`active` ,
`rang` ,
`invoice_text` ,
`order_text` ,
`helperjoinkey`
)
VALUES (
NULL , 'Kundenspezifisch', 'customized', '1', '8', 'Kundenspezifisch', '', 'customized'
);

ALTER TABLE `shipping_area` ADD `active_customized` TINYINT( 2 ) NOT NULL AFTER `active_bar`;
ALTER TABLE `shipping_area` ADD `add_customized` DECIMAL( 9, 2 ) NOT NULL AFTER `add_bar`;
ALTER TABLE `shipping_area` ADD `account_type_customized` TINYINT( 4 ) NOT NULL AFTER `account_type_bar`;

ALTER TABLE `items` ADD `bargain_price_type` TINYINT( 2 ) NOT NULL DEFAULT '0';

ALTER TABLE `item_type_definitions` ADD `item_type_definition_type` TINYINT( 2 ) NOT NULL DEFAULT '0';

INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('cash_desk_order_completed', 'formated', 'SHOP_TEXT', 'Ihre Bestellung mit der Bestellnummer <strong>[#order_number]</strong> wurde erfolgreich an uns &uuml;bermittelt.', 1, 'Text für die Bestellbestätigungsseite.');

ALTER TABLE `item_types` ADD `item_type_available_from` DATETIME NULL;
ALTER TABLE `item_types` ADD `item_type_available_until` DATETIME NULL;

INSERT INTO `configuration` (`name`, `group_id`, `setting`, `description`) VALUES ('save_customer_shoppingcart', 'shoppingcart', '0', 'Warenkorb für eingeloggte Kunden speichern.');

ALTER TABLE `shopping_cart_items` ADD `customer_id` int(11) NOT NULL DEFAULT '0';

ALTER TABLE `shipping_area` ADD `free_payment_nn` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_pp` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_vk` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_be` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_r` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_bar` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_computop_creditcard` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_billpay_invoice` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_paymorrow_rechnung` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_paymorrow_raten` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_klarna_rechnung` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_klarna_raten` DECIMAL(6,2) NOT NULL DEFAULT '0.0';
ALTER TABLE `shipping_area` ADD `free_payment_customized` DECIMAL(6,2) NOT NULL DEFAULT '0.0';

ALTER TABLE `items` ADD `last_change_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `items` ADD `last_change_user_id` int(11) NOT NULL DEFAULT '0';

INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield1_name', 'text', 'CUSTOMER', 'Freitextfeld 1', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');
INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield2_name', 'text', 'CUSTOMER', 'Freitextfeld 2', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');
INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield3_name', 'text', 'CUSTOMER', 'Freitextfeld 3', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');
INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield4_name', 'text', 'CUSTOMER', 'Freitextfeld 4', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');
INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield5_name', 'text', 'CUSTOMER', 'Freitextfeld 5', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');
INSERT INTO `configuration` (`name`, `text`, `group_id`, `setting`, `type`, `description`) VALUES
('customer_freetextfield6_name', 'text', 'CUSTOMER', 'Freitextfeld 6', 1, 'Bezeichnung für das Freitextfeld 1 der Kundendaten.');