# ************************************************************
# Host: localhost (MySQL 5.7.40-0ubuntu0.18.04.1)
# Datenbank: jtl_typo3
# Verarbeitungszeit: 2022-12-07 13:42:25 +0000
# ************************************************************




# Tabellen-Dump account_api_license_agreements
# ------------------------------------------------------------

CREATE TABLE `account_api_license_agreements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `file` varchar(255) CHARACTER SET latin1 NOT NULL,
  `accepted_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id_file` (`account_id`,`file`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump account_deleted
# ------------------------------------------------------------

CREATE TABLE `account_deleted` (
  `id` int(11) NOT NULL,
  `customer_number` varchar(255) DEFAULT NULL,
  `salutation` varchar(255) DEFAULT NULL,
  `first_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `company` varchar(255) DEFAULT NULL,
  `street` varchar(255) DEFAULT NULL,
  `zipcode` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `extra_address_line` varchar(255) DEFAULT NULL,
  `country` varchar(255) DEFAULT NULL,
  `tax_id` varchar(255) DEFAULT NULL,
  `deleted_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump account_email_changes
# ------------------------------------------------------------

CREATE TABLE `account_email_changes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `email_current` varchar(50) NOT NULL,
  `email_new` varchar(50) NOT NULL,
  `confirmed` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump account_locations
# ------------------------------------------------------------

CREATE TABLE `account_locations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `latitude` decimal(10,8) NOT NULL,
  `longitude` decimal(11,8) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `nNoValidAddress` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump account_support
# ------------------------------------------------------------

CREATE TABLE `account_support` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) unsigned NOT NULL,
  `support_id` int(11) unsigned NOT NULL,
  `unique_price` decimal(15,4) unsigned DEFAULT NULL,
  `paid_until` date DEFAULT NULL,
  `booked_at` date NOT NULL,
  `terminated_on` datetime DEFAULT NULL,
  `terminated_to` date DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`),
  KEY `account_support_support_id_foreign` (`support_id`),
  CONSTRAINT `account_support_support_id_foreign` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump account_support_changes
# ------------------------------------------------------------

CREATE TABLE `account_support_changes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(10) unsigned NOT NULL DEFAULT '0',
  `current_support_id` int(11) unsigned NOT NULL,
  `new_support_id` int(11) unsigned NOT NULL,
  `is_done` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `is_revoked` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `change_at` date NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `new_support_id` (`new_support_id`),
  KEY `account_support_changes_current_support_id_foreign` (`current_support_id`),
  CONSTRAINT `account_support_changes_current_support_id_foreign` FOREIGN KEY (`current_support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE,
  CONSTRAINT `account_support_changes_new_support_id_foreign` FOREIGN KEY (`new_support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump account_support_orders
# ------------------------------------------------------------

CREATE TABLE `account_support_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `price` decimal(15,4) unsigned NOT NULL,
  `is_paid` tinyint(4) NOT NULL DEFAULT '0',
  `is_storno` tinyint(4) NOT NULL DEFAULT '0',
  `booked_at` date NOT NULL,
  `minimum_contract_period_until` date NOT NULL,
  `terminated_by` varchar(100) NOT NULL DEFAULT '',
  `terminated_on` date DEFAULT NULL,
  `terminated_to` date DEFAULT NULL,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump account_support_tmp
# ------------------------------------------------------------

CREATE TABLE `account_support_tmp` (
  `account_id` int(11) NOT NULL,
  `support_id` int(11) unsigned NOT NULL DEFAULT '3',
  `paid_until` date NOT NULL DEFAULT '2020-01-01',
  `booked_at` date NOT NULL DEFAULT '2019-11-19',
  `created_at` datetime NOT NULL DEFAULT '2019-11-19 11:30:00',
  `updated_at` datetime NOT NULL DEFAULT '2019-11-19 11:30:00',
  KEY `support_id` (`support_id`),
  CONSTRAINT `account_support_tmp_ibfk_1` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump account_supports
# ------------------------------------------------------------

CREATE TABLE `account_supports` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `support_id` int(11) unsigned NOT NULL,
  `account_support_order_id` int(11) NOT NULL,
  `state` enum('TERMINATED','ACTIVE','BLOCKED','STORNO') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`id`),
  KEY `support_id` (`support_id`),
  KEY `account_support_order_id` (`account_support_order_id`),
  KEY `account_supports_account_id_index` (`account_id`),
  CONSTRAINT `account_supports_ibfk_1` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`),
  CONSTRAINT `account_supports_ibfk_2` FOREIGN KEY (`account_support_order_id`) REFERENCES `account_support_orders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump acl_access
# ------------------------------------------------------------

CREATE TABLE `acl_access` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `acl_account_id` int(10) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pin_code` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_enabled` tinyint(1) NOT NULL DEFAULT '1',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_acl_access_acl_account_id_idx` (`acl_account_id`),
  CONSTRAINT `fk_acl_access_acl_account_id` FOREIGN KEY (`acl_account_id`) REFERENCES `acl_accounts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_access_roles
# ------------------------------------------------------------

CREATE TABLE `acl_access_roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `acl_access_id` int(10) unsigned NOT NULL,
  `acl_role_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `acl_access_id_acl_role_id_unique` (`acl_access_id`,`acl_role_id`),
  KEY `acl_access_id_UNIQUE` (`acl_access_id`),
  KEY `acl_role_id_UNIQUE` (`acl_role_id`),
  CONSTRAINT `fk_acl_access_roles_acl_access_id` FOREIGN KEY (`acl_access_id`) REFERENCES `acl_access` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_acl_access_roles_acl_role_id` FOREIGN KEY (`acl_role_id`) REFERENCES `acl_roles` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_categories
# ------------------------------------------------------------

CREATE TABLE `acl_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sort` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_groups
# ------------------------------------------------------------

CREATE TABLE `acl_groups` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `acl_category_id` int(10) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sort` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fk_acl_groups_acl_category_id_idx` (`acl_category_id`),
  CONSTRAINT `fk_acl_groups_acl_category_id` FOREIGN KEY (`acl_category_id`) REFERENCES `acl_categories` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_role_permissions
# ------------------------------------------------------------

CREATE TABLE `acl_role_permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `acl_role_id` int(10) unsigned NOT NULL,
  `acl_permission_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `acl_role_id_acl_permission_id_unique` (`acl_role_id`,`acl_permission_id`),
  KEY `acl_role_id_idx` (`acl_role_id`),
  KEY `acl_permission_id_idx` (`acl_permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_role_templates
# ------------------------------------------------------------

CREATE TABLE `acl_role_templates` (
  `id` int(10) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `permissions` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump acl_roles
# ------------------------------------------------------------

CREATE TABLE `acl_roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `acl_role_template_id` int(10) unsigned DEFAULT NULL,
  `acl_account_id` int(10) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fk_acl_roles_acl_account_id_idx` (`acl_account_id`),
  KEY `fk_acl_roles_acl_role_template_id_idx` (`acl_role_template_id`),
  CONSTRAINT `fk_acl_roles_acl_account_id` FOREIGN KEY (`acl_account_id`) REFERENCES `acl_accounts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump aktionjtlconnect2018
# ------------------------------------------------------------

CREATE TABLE `aktionjtlconnect2018` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `coupon` varchar(255) NOT NULL,
  `account_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump aktionshipack2018
# ------------------------------------------------------------

CREATE TABLE `aktionshipack2018` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `account_id` int(13) NOT NULL,
  `created_at` datetime NOT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;





















# Tabellen-Dump bitrix_companys
# ------------------------------------------------------------

CREATE TABLE `bitrix_companys` (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`),
  KEY `created_at` (`created_at`),
  KEY `updated_at` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_contacts
# ------------------------------------------------------------

CREATE TABLE `bitrix_contacts` (
  `id` int(11) NOT NULL,
  `company_id` int(11) NOT NULL DEFAULT '0',
  `account_id` int(11) NOT NULL DEFAULT '0',
  `contact_id` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `contact_id` (`contact_id`),
  KEY `company_id` (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_country_mappings
# ------------------------------------------------------------

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



# Tabellen-Dump bitrix_program_category
# ------------------------------------------------------------

CREATE TABLE `bitrix_program_category` (
  `id` int(11) NOT NULL,
  `programm_cat_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_programm_id` (`programm_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_program_status
# ------------------------------------------------------------

CREATE TABLE `bitrix_program_status` (
  `id` int(11) NOT NULL,
  `programm_id` int(11) NOT NULL,
  `status_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_programm_status_key` (`programm_id`,`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_programs
# ------------------------------------------------------------

CREATE TABLE `bitrix_programs` (
  `id` int(11) NOT NULL,
  `programm_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_programm_id` (`programm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_servicepartner_focus_service
# ------------------------------------------------------------

CREATE TABLE `bitrix_servicepartner_focus_service` (
  `id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_service_id` (`service_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump bitrix_sync_failed_jobs
# ------------------------------------------------------------

CREATE TABLE `bitrix_sync_failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text COLLATE utf8_unicode_ci NOT NULL,
  `queue` text COLLATE utf8_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump bitrix_sync_migrations
# ------------------------------------------------------------

CREATE TABLE `bitrix_sync_migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump contract_types
# ------------------------------------------------------------

CREATE TABLE `contract_types` (
  `id` int(13) NOT NULL,
  `name` char(200) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump contract_types_translations
# ------------------------------------------------------------

CREATE TABLE `contract_types_translations` (
  `id` int(11) NOT NULL,
  `translation` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump contracts
# ------------------------------------------------------------

CREATE TABLE `contracts` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `content` longtext,
  `content_html2pdf` longtext,
  `type_id` char(20) DEFAULT NULL,
  `pdf_filepath` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `kAccount` int(13) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump contractshistory
# ------------------------------------------------------------

CREATE TABLE `contractshistory` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `admin_id` int(13) DEFAULT NULL,
  `contract_id` int(13) DEFAULT NULL,
  `content` longtext CHARACTER SET utf8,
  `changelog` longtext CHARACTER SET utf8,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump ctr_intervallglaettung
# ------------------------------------------------------------

CREATE TABLE `ctr_intervallglaettung` (
  `kAccount` int(10) unsigned NOT NULL,
  `dRechnungsmonat` date NOT NULL,
  `cPosTyp` varchar(30) NOT NULL,
  `fGlaettung` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`kAccount`,`dRechnungsmonat`,`cPosTyp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ctr_kohorte
# ------------------------------------------------------------

CREATE TABLE `ctr_kohorte` (
  `cPosTyp` varchar(20) NOT NULL,
  `nSumme` int(10) unsigned DEFAULT NULL,
  `nAnzahlKunden` int(10) unsigned DEFAULT NULL,
  `fSchnittProKunde` decimal(8,2) DEFAULT NULL,
  `dKohortenmonat` date NOT NULL,
  `dRechnungsmonat` date NOT NULL,
  PRIMARY KEY (`cPosTyp`,`dKohortenmonat`,`dRechnungsmonat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ctr_kohortemeta
# ------------------------------------------------------------

CREATE TABLE `ctr_kohortemeta` (
  `kAccount` int(10) unsigned NOT NULL,
  `dErsteRechnung` date DEFAULT NULL,
  `dLetzteRechnung` date DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ctr_umsatz
# ------------------------------------------------------------

CREATE TABLE `ctr_umsatz` (
  `cPosTyp` varchar(20) NOT NULL,
  `dRechnungsmonat` date NOT NULL,
  `nSumme` int(10) unsigned DEFAULT NULL,
  `nAnzahlKunden` int(10) unsigned DEFAULT NULL,
  `nAbwanderungKunden` int(11) DEFAULT NULL,
  `nZuwanderungKunden` int(11) DEFAULT NULL,
  `fSchnittProKunde` decimal(8,2) DEFAULT NULL,
  `nUpsell` int(10) unsigned DEFAULT NULL,
  `nDownsell` int(10) unsigned DEFAULT NULL,
  `nAbwanderung` int(10) unsigned DEFAULT NULL,
  `nZuwanderung` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`cPosTyp`,`dRechnungsmonat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump customergroups
# ------------------------------------------------------------

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



# Tabellen-Dump exs_dpa_confirmation
# ------------------------------------------------------------

CREATE TABLE `exs_dpa_confirmation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump exs_dpa_confirmation_history
# ------------------------------------------------------------

CREATE TABLE `exs_dpa_confirmation_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `accepted_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump exs_order_item_metas
# ------------------------------------------------------------

CREATE TABLE `exs_order_item_metas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_item_id` int(10) unsigned NOT NULL,
  `name` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `exs_order_item_metas_item_id_name_unique` (`order_item_id`,`name`),
  KEY `order_item_metas_order_item_id_foreign` (`order_item_id`),
  CONSTRAINT `order_item_metas_order_item_id_foreign` FOREIGN KEY (`order_item_id`) REFERENCES `exs_order_items` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_order_items
# ------------------------------------------------------------

CREATE TABLE `exs_order_items` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(10) unsigned NOT NULL,
  `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sku` varchar(127) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` int(10) unsigned NOT NULL,
  `currency_code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` decimal(30,2) NOT NULL,
  `tax` decimal(30,2) DEFAULT NULL,
  `tax_rate` decimal(30,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `order_items_order_id_foreign` (`order_id`),
  CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `exs_orders` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_order_metas
# ------------------------------------------------------------

CREATE TABLE `exs_order_metas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(10) unsigned NOT NULL,
  `name` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_metas_order_id_name_unique` (`order_id`,`name`),
  CONSTRAINT `order_metas_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `exs_orders` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_order_refunds
# ------------------------------------------------------------

CREATE TABLE `exs_order_refunds` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(10) unsigned NOT NULL,
  `platform_fee` int(11) NOT NULL,
  `refund_amount` int(11) NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `exs_order_refunds_order_id_foreign` (`order_id`),
  CONSTRAINT `exs_order_refunds_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `exs_orders` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_orders
# ------------------------------------------------------------

CREATE TABLE `exs_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_number` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `buyer_id` int(10) unsigned DEFAULT NULL,
  `seller_id` int(10) unsigned DEFAULT NULL,
  `status` enum('CREATED','APPROVED','COMPLETED','CANCELED') COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_provider` varchar(127) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount_total` decimal(30,2) NOT NULL DEFAULT '0.00',
  `platform_fee` decimal(30,2) NOT NULL DEFAULT '0.00',
  `tax_total` decimal(30,2) NOT NULL DEFAULT '0.00',
  `currency_code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `canceled_at` timestamp NULL DEFAULT NULL,
  `no_invoice` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `orders_order_number_unique` (`order_number`),
  KEY `orders_buyer_id_foreign` (`buyer_id`),
  KEY `orders_seller_id_foreign` (`seller_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_orders_backup
# ------------------------------------------------------------

CREATE TABLE `exs_orders_backup` (
  `id` int(10) unsigned NOT NULL,
  `order_number` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `context_id` int(10) unsigned DEFAULT NULL,
  `buyer_id` int(10) unsigned DEFAULT NULL,
  `seller_id` int(10) unsigned DEFAULT NULL,
  `status` enum('CREATED','APPROVED','COMPLETED','CANCELED') COLLATE utf8mb4_unicode_ci NOT NULL,
  `payment_provider` varchar(127) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount_total` decimal(30,2) NOT NULL DEFAULT '0.00',
  `platform_fee` decimal(30,2) NOT NULL DEFAULT '0.00',
  `tax_total` decimal(30,2) NOT NULL DEFAULT '0.00',
  `currency_code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `canceled_at` timestamp NULL DEFAULT NULL,
  `no_invoice` tinyint(1) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_orders_paypalreport_details
# ------------------------------------------------------------

CREATE TABLE `exs_orders_paypalreport_details` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `CH` varchar(5) DEFAULT NULL,
  `TRANSACTION_TYPE` varchar(255) DEFAULT NULL,
  `TRANSACTION_SUBTYPE` varchar(255) DEFAULT NULL,
  `COUNTERPARTY_ACCOUNT_ID` varchar(255) DEFAULT NULL,
  `COUNTERPARTY_TRANSACTION_TYPE` varchar(255) DEFAULT NULL,
  `COUNTERPARTY_TRANSACTION_SUBTYPE` varchar(255) DEFAULT NULL,
  `PAYPAL_REFERENCE_ID` varchar(50) DEFAULT NULL,
  `PAYPAL_TRANSACTION_ID` varchar(50) DEFAULT NULL,
  `INVOICE_ID` varchar(50) DEFAULT NULL,
  `CUSTOM_FIELD` varchar(100) DEFAULT NULL,
  `TRANSACTION_DATE` datetime DEFAULT NULL,
  `INTEGRATION_IDENTIFIER` varchar(255) DEFAULT NULL,
  `PP_FEES` decimal(10,4) DEFAULT NULL,
  `PP_FEES_PERCENTAGE` varchar(20) DEFAULT NULL,
  `PP_FEES_FIXED_AMOUNT` decimal(10,4) DEFAULT NULL,
  `PP_FEES_CURRENCY` varchar(5) DEFAULT NULL,
  `BASE_FX_RATE` decimal(10,4) DEFAULT NULL,
  `MARKUP_FX_RATE` decimal(10,4) DEFAULT NULL,
  `NET_FX_RATE` decimal(10,4) DEFAULT NULL,
  `TRANSACTION_CURRENCY` varchar(5) DEFAULT NULL,
  `TRANSACTION_AMOUNT` decimal(10,4) DEFAULT NULL,
  `DECLINE_CODE` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `INVOICE_ID` (`INVOICE_ID`),
  KEY `PAYPAL_REFERENCE_ID` (`PAYPAL_REFERENCE_ID`),
  KEY `PAYPAL_TRANSACTION_ID` (`PAYPAL_TRANSACTION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_paypalreport_pyt
# ------------------------------------------------------------

CREATE TABLE `exs_orders_paypalreport_pyt` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `CH` varchar(5) DEFAULT NULL,
  `TRANSACTION_TYPE` varchar(255) DEFAULT NULL,
  `TRANSACTION_SUBTYPE` varchar(255) DEFAULT NULL,
  `SELLER_ACCOUNT_ID` varchar(50) DEFAULT NULL,
  `PAYPAL_REFERENCE_ID` varchar(50) DEFAULT NULL,
  `PAYPAL_TRANSACTION_ID` varchar(50) DEFAULT NULL,
  `INVOICE_ID` varchar(50) DEFAULT NULL,
  `CUSTOM_FIELD` varchar(100) DEFAULT NULL,
  `TRANSACTION_DATE` datetime DEFAULT NULL,
  `INTEGRATION_IDENTIFIER` varchar(50) DEFAULT NULL,
  `PAYMENT_INSTRUMENT_TYPE` varchar(50) DEFAULT NULL,
  `PAYMENT_INSTRUMENT_SUBTYPE` varchar(50) DEFAULT NULL,
  `CHECKOUT_CHANNEL` varchar(50) DEFAULT NULL,
  `DELAYED_DISBURSEMENT` varchar(5) DEFAULT NULL,
  `TRANSACTION_AMOUNT` decimal(10,4) DEFAULT NULL,
  `TRANSACTION_CURRENCY` varchar(5) DEFAULT NULL,
  `TRANSACTION_DEBIT_CREDIT_CODE` varchar(10) DEFAULT NULL,
  `PENDING_DISBURSEMENT_AMOUNT` decimal(10,4) DEFAULT NULL,
  `PENDING_DISBURSEMENT_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `SELLER_AMOUNT` decimal(10,4) DEFAULT NULL,
  `SELLER_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `PARTNER_FEE` decimal(10,4) DEFAULT NULL,
  `PARTNER_FEE_CURRENCY` varchar(5) DEFAULT NULL,
  `PARTNER_FEE_ACCOUNT_ID` varchar(50) DEFAULT NULL,
  `PP_FEES` decimal(10,4) DEFAULT NULL,
  `PP_FEES_CURRENCY` varchar(5) DEFAULT NULL,
  `PP_FEES_PERCENTAGE` varchar(20) DEFAULT NULL,
  `PP_FEES_FIXED_AMOUNT` decimal(10,4) DEFAULT NULL,
  `PP_FEES_XB_PERCENTAGE` varchar(20) DEFAULT NULL,
  `PP_FEES_XB_FIXED_AMOUNT` decimal(10,4) DEFAULT NULL,
  `PP_FEES_XB_TOTAL_AMOUNT` decimal(10,4) DEFAULT NULL,
  `CHARGEBACK_FEE` decimal(10,4) DEFAULT NULL,
  `CHARGEBACK_FEE_CURRENCY` varchar(5) DEFAULT NULL,
  `HOLD_AMOUNT` decimal(10,4) DEFAULT NULL,
  `HOLD_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `RECOUP_AMOUNT` decimal(10,4) DEFAULT NULL,
  `RECOUP_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `RECOUP_ACCOUNT_ID` varchar(50) DEFAULT NULL,
  `PAYABLE_AMOUNT` decimal(10,4) DEFAULT NULL,
  `PAYABLE_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `PAYABLE_ACCOUNT_ID` varchar(50) DEFAULT NULL,
  `EXTERNAL_TRANSFER_AMOUNT` decimal(10,4) DEFAULT NULL,
  `EXTERNAL_TRANSFER_AMOUNT_CURRENCY` varchar(5) DEFAULT NULL,
  `COUNTERPARTY_ACCOUNT_ID` varchar(50) DEFAULT NULL,
  `SETTLEMENT_REFERENCE_ID` varchar(50) DEFAULT NULL,
  `STORE_ID` varchar(50) DEFAULT NULL,
  `TRANSACTION_STATUS` varchar(50) DEFAULT NULL,
  `DECLINE_CODE` varchar(50) DEFAULT NULL,
  `PAYOUT_REFERENCE_ID` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `INVOICE_ID` (`INVOICE_ID`),
  KEY `PAYPAL_REFERENCE_ID` (`PAYPAL_REFERENCE_ID`),
  KEY `PAYPAL_TRANSACTION_ID` (`PAYPAL_TRANSACTION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_paypalreport_stats
# ------------------------------------------------------------

CREATE TABLE `exs_orders_paypalreport_stats` (
  `cReportType` varchar(100) NOT NULL,
  `nDatensaetze` int(10) unsigned DEFAULT NULL,
  `dDatum` date NOT NULL,
  PRIMARY KEY (`dDatum`,`cReportType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_provisionsgutschrift
# ------------------------------------------------------------

CREATE TABLE `exs_orders_provisionsgutschrift` (
  `kOrdersProvisionsgutschrift` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `dRechnungsdatum` date DEFAULT NULL,
  `nGutschriftsnummer` int(10) unsigned DEFAULT NULL,
  `cGutschriftsnummer` varchar(15) DEFAULT NULL,
  `cZahlungsart` varchar(255) DEFAULT NULL,
  `cPDFDokumentPfad` varchar(255) DEFAULT NULL,
  `dPDFZugestellt` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kOrdersProvisionsgutschrift`),
  KEY `exs_orders_provisionsgutschrift_kAccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_provisionsgutschriftpos
# ------------------------------------------------------------

CREATE TABLE `exs_orders_provisionsgutschriftpos` (
  `kOrdersProvisionsgutschriftPos` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kOrdersProvisionsgutschrift` int(10) unsigned DEFAULT NULL,
  `kOrdersProvisionsrechnungPos` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `nAnzahl` int(10) unsigned DEFAULT NULL,
  `fBetrag` decimal(30,2) DEFAULT NULL,
  `fMwSt` decimal(30,2) DEFAULT NULL,
  `cPosTyp` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`kOrdersProvisionsgutschriftPos`),
  KEY `exs_orders_provisionsgutschriftpos_gutschrift_index` (`kOrdersProvisionsgutschrift`),
  KEY `exs_kOrdersProvisionsrechnungPos_index` (`kOrdersProvisionsrechnungPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_provisionsrechnung
# ------------------------------------------------------------

CREATE TABLE `exs_orders_provisionsrechnung` (
  `kOrdersProvisionsrechnung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `dRechnungsdatum` date DEFAULT NULL,
  `nRechnungsnummer` int(10) unsigned DEFAULT NULL,
  `cRechnungsnummer` varchar(15) DEFAULT NULL,
  `cZahlungsart` varchar(255) DEFAULT NULL,
  `cPDFDokumentPfad` varchar(255) DEFAULT NULL,
  `dPDFZugestellt` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kOrdersProvisionsrechnung`),
  KEY `exs_orders_provisionsrechnung_kAccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_orders_provisionsrechnungpos
# ------------------------------------------------------------

CREATE TABLE `exs_orders_provisionsrechnungpos` (
  `kOrdersProvisionsrechnungPos` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kOrdersProvisionsrechnung` int(10) unsigned DEFAULT NULL,
  `orders_id` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `nAnzahl` int(10) unsigned DEFAULT NULL,
  `fBetrag` decimal(30,2) DEFAULT NULL,
  `fMwSt` decimal(30,2) DEFAULT NULL,
  `cPosTyp` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`kOrdersProvisionsrechnungPos`),
  KEY `exs_orders_provisionsrechnungpos_kOrdersProvisionsrechnung_index` (`kOrdersProvisionsrechnung`),
  KEY `exs_orders_provisionsrechnungpos_orders_id_index` (`orders_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_seller_mailarchive
# ------------------------------------------------------------

CREATE TABLE `exs_seller_mailarchive` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(11) DEFAULT NULL,
  `exs_seller_id` int(11) DEFAULT NULL,
  `mail_type` int(11) DEFAULT NULL,
  `mail_content_html` longtext COLLATE utf8mb4_unicode_ci,
  `mail_content_text` longtext COLLATE utf8mb4_unicode_ci,
  `recipient_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `recipient_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_seller_marketplace
# ------------------------------------------------------------

CREATE TABLE `exs_seller_marketplace` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `seller_id` int(11) unsigned NOT NULL,
  `partner_referral_id` varchar(255) DEFAULT NULL,
  `tracking_id` varchar(255) DEFAULT NULL,
  `merchant_id` varchar(30) DEFAULT NULL,
  `status` enum('onboarding','no_payments','confirm_email','approved') NOT NULL DEFAULT 'onboarding',
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump exs_seller_notes
# ------------------------------------------------------------

CREATE TABLE `exs_seller_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `author_id` int(11) NOT NULL,
  `exs_seller_id` int(11) NOT NULL,
  `type` enum('info','warning') COLLATE utf8mb4_unicode_ci DEFAULT 'info',
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_seller_profile_localizations
# ------------------------------------------------------------

CREATE TABLE `exs_seller_profile_localizations` (
  `exs_seller_profile_id` int(11) NOT NULL,
  `locale` varchar(2) NOT NULL,
  `company_url` varchar(255) NOT NULL,
  `company_description` text NOT NULL,
  `contact_data_imprint` text NOT NULL,
  `seller_own_agb_url` varchar(255) NOT NULL,
  `service_partner_profile_key` varchar(255) NOT NULL,
  `solution_provider_profile_key` varchar(255) NOT NULL,
  PRIMARY KEY (`exs_seller_profile_id`,`locale`),
  KEY `locale` (`locale`),
  CONSTRAINT `exs_seller_profile_localizations_ibfk_1` FOREIGN KEY (`exs_seller_profile_id`) REFERENCES `exs_seller_profiles` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump exs_seller_profiles
# ------------------------------------------------------------

CREATE TABLE `exs_seller_profiles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `exs_seller_id` int(11) NOT NULL,
  `logo` varchar(255) NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `seller_prefix` varchar(4) NOT NULL,
  `system_mail_address` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `company_name` (`company_name`),
  UNIQUE KEY `exs_seller_profiles_seller_prefix_unique` (`seller_prefix`),
  KEY `exs_seller_id` (`exs_seller_id`),
  CONSTRAINT `exs_seller_profiles_ibfk_1` FOREIGN KEY (`exs_seller_id`) REFERENCES `exs_sellers` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump exs_seller_request_history
# ------------------------------------------------------------

CREATE TABLE `exs_seller_request_history` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `request_data` longtext COLLATE utf8mb4_unicode_ci,
  `request_date` datetime NOT NULL,
  `request_update` datetime NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_seller_statehistory
# ------------------------------------------------------------

CREATE TABLE `exs_seller_statehistory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `changed_by` int(11) NOT NULL,
  `exs_seller_id` int(11) NOT NULL,
  `from_onboarding_state` enum('onboarding','onboarded','rejected') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_onboarding_state` enum('onboarding','onboarded','rejected') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `from_listing_state` enum('onboarding','active','locked','terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'onboarding',
  `to_listing_state` enum('onboarding','active','locked','terminated') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'onboarding',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump exs_sellers
# ------------------------------------------------------------

CREATE TABLE `exs_sellers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) unsigned NOT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `phone_number` varchar(30) NOT NULL,
  `first_name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `last_name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `offer_description` text CHARACTER SET utf8mb4 NOT NULL,
  `notes` text CHARACTER SET utf8mb4,
  `public_warning_notes` longtext,
  `public_blocking_notes` longtext,
  `certificate_state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=missing, 1=InCheck, 2=Accepted, 3=Rejected ',
  `paypal_authorized_state` enum('authorized','pending','denied') CHARACTER SET utf8mb4 DEFAULT NULL,
  `onboarding_state` enum('onboarded','onboarding','rejected') CHARACTER SET utf8mb4 NOT NULL DEFAULT 'onboarding',
  `listing_state` enum('onboarding','active','locked','terminated') CHARACTER SET utf8mb4 NOT NULL DEFAULT 'onboarding',
  `state` enum('active','inactive','rejected') CHARACTER SET utf8mb4 NOT NULL,
  `bLicenseMigrationActive` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `exs_sellers_account_id_listing_state_index` (`account_id`,`listing_state`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;





# Tabellen-Dump extension_availabilities
# ------------------------------------------------------------

CREATE TABLE `extension_availabilities` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_availability_translations
# ------------------------------------------------------------

CREATE TABLE `extension_availability_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `availability_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `availability_id` (`availability_id`,`locale_id`),
  KEY `extension_availibility_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_availability_translations_availability_id_foreign` FOREIGN KEY (`availability_id`) REFERENCES `extension_availabilities` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_availibility_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_catchword_translations
# ------------------------------------------------------------

CREATE TABLE `extension_catchword_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `catchword_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_catchword_translations_locale_id_foreign` (`locale_id`),
  KEY `extension_catchword_translations_catchword_id_foreign` (`catchword_id`) USING BTREE,
  CONSTRAINT `extension_catchword_translations_catchword_id_foreign` FOREIGN KEY (`catchword_id`) REFERENCES `extension_catchwords` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_catchword_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_catchwords
# ------------------------------------------------------------

CREATE TABLE `extension_catchwords` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_categories
# ------------------------------------------------------------

CREATE TABLE `extension_categories` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `type_id` int(11) unsigned DEFAULT NULL,
  `parent_id` int(10) unsigned DEFAULT NULL,
  `level` tinyint(3) unsigned NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_categories_type_id_foreign` (`type_id`),
  KEY `parent_id` (`parent_id`),
  CONSTRAINT `extension_categories_type_id_foreign` FOREIGN KEY (`type_id`) REFERENCES `extension_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_category
# ------------------------------------------------------------

CREATE TABLE `extension_category` (
  `extension_id` int(11) unsigned NOT NULL,
  `category_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`extension_id`,`category_id`),
  KEY `extension_category_category_id_foreign` (`category_id`),
  CONSTRAINT `extension_category_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `extension_categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_category_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_category_translations
# ------------------------------------------------------------

CREATE TABLE `extension_category_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_category_translations_category_id_foreign` (`category_id`) USING BTREE,
  KEY `extension_category_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_category_translations_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `extension_categories` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_category_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_certification_translations
# ------------------------------------------------------------

CREATE TABLE `extension_certification_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `certification_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_certification_translations_certification_id_foreign` (`certification_id`) USING BTREE,
  KEY `extension_certification_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_certification_translations_certification_id_foreign` FOREIGN KEY (`certification_id`) REFERENCES `extension_certifications` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_certification_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_certifications
# ------------------------------------------------------------

CREATE TABLE `extension_certifications` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_changelog_translations
# ------------------------------------------------------------

CREATE TABLE `extension_changelog_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `changelog_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `text` text COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_changelog_translations_changelog_id_foreign` (`changelog_id`) USING BTREE,
  KEY `extension_changelog_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_changelog_translations_changelog_id_foreign` FOREIGN KEY (`changelog_id`) REFERENCES `extension_changelogs` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_changelog_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_changelogs
# ------------------------------------------------------------

CREATE TABLE `extension_changelogs` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `extension_id` int(11) unsigned NOT NULL,
  `version` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `published_at` datetime NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_changelogs_extension_id_foreign` (`extension_id`),
  CONSTRAINT `extension_changelogs_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_compatibilities
# ------------------------------------------------------------

CREATE TABLE `extension_compatibilities` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(11) unsigned NOT NULL,
  `changelog_id` int(11) unsigned NOT NULL,
  `version_from` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `version_to` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_compatibilities_changelog_id_foreign` (`changelog_id`),
  CONSTRAINT `extension_compatibilities_changelog_id_foreign` FOREIGN KEY (`changelog_id`) REFERENCES `extension_changelogs` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_feature
# ------------------------------------------------------------

CREATE TABLE `extension_feature` (
  `extension_id` int(11) unsigned NOT NULL,
  `feature_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`extension_id`,`feature_id`),
  KEY `extension_feature_feature_id_foreign` (`feature_id`),
  CONSTRAINT `extension_feature_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_feature_feature_id_foreign` FOREIGN KEY (`feature_id`) REFERENCES `extension_features` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_feature_translations
# ------------------------------------------------------------

CREATE TABLE `extension_feature_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `feature_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_feature_translations_feature_id_foreign` (`feature_id`) USING BTREE,
  KEY `extension_feature_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_feature_translations_feature_id_foreign` FOREIGN KEY (`feature_id`) REFERENCES `extension_features` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_feature_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_features
# ------------------------------------------------------------

CREATE TABLE `extension_features` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `sort` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_image_anchor_translations
# ------------------------------------------------------------

CREATE TABLE `extension_image_anchor_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `anchor_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_image_anchor_translations_anchor_id_foreign` (`anchor_id`) USING BTREE,
  KEY `extension_image_anchor_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_image_anchor_translations_anchor_id_foreign` FOREIGN KEY (`anchor_id`) REFERENCES `extension_image_anchors` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_image_anchor_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_image_anchors
# ------------------------------------------------------------

CREATE TABLE `extension_image_anchors` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_image_translations
# ------------------------------------------------------------

CREATE TABLE `extension_image_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `image_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_image_translations_image_id_foreign` (`image_id`) USING BTREE,
  KEY `extension_image_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_image_translations_image_id_foreign` FOREIGN KEY (`image_id`) REFERENCES `extension_images` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_image_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_images
# ------------------------------------------------------------

CREATE TABLE `extension_images` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `extension_id` int(11) unsigned NOT NULL,
  `anchor_id` int(11) unsigned DEFAULT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_images_extension_id_foreign` (`extension_id`),
  KEY `extension_images_anchor_id` (`anchor_id`),
  CONSTRAINT `extension_images_anchor_id` FOREIGN KEY (`anchor_id`) REFERENCES `extension_image_anchors` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_images_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_price_feature_translations
# ------------------------------------------------------------

CREATE TABLE `extension_price_feature_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `feature_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_price_feature_translations_feature_id_foreign` (`feature_id`) USING BTREE,
  KEY `extension_price_feature_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_price_feature_translations_feature_id_foreign` FOREIGN KEY (`feature_id`) REFERENCES `extension_price_features` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_price_feature_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_price_features
# ------------------------------------------------------------

CREATE TABLE `extension_price_features` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `price_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_price_features_price_id_foreign` (`price_id`),
  CONSTRAINT `extension_price_features_price_id_foreign` FOREIGN KEY (`price_id`) REFERENCES `extension_prices` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_price_translations
# ------------------------------------------------------------

CREATE TABLE `extension_price_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `price_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `note` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  KEY `extension_price_translations_price_id_foreign` (`price_id`) USING BTREE,
  KEY `extension_price_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_price_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_price_translations_price_id_foreign` FOREIGN KEY (`price_id`) REFERENCES `extension_prices` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_prices
# ------------------------------------------------------------

CREATE TABLE `extension_prices` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `extension_id` int(11) unsigned NOT NULL,
  `price` decimal(15,4) NOT NULL,
  `subscription_price` decimal(15,4) DEFAULT '0.0000',
  `interval` int(11) unsigned DEFAULT '0' COMMENT 'Months',
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `is_preview` tinyint(1) DEFAULT '0',
  `is_starting_price` tinyint(1) DEFAULT '0',
  `on_demand` tinyint(1) DEFAULT '0',
  `sort` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_prices_extension_id_foreign` (`extension_id`),
  CONSTRAINT `extension_prices_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_specific_translations
# ------------------------------------------------------------

CREATE TABLE `extension_specific_translations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `specific_id` int(10) unsigned NOT NULL,
  `locale_id` int(10) unsigned NOT NULL,
  `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_specific_translations_specific_id_index` (`specific_id`),
  KEY `extension_specific_translations_locale_id_index` (`locale_id`),
  CONSTRAINT `extension_specific_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_specific_translations_specific_id_foreign` FOREIGN KEY (`specific_id`) REFERENCES `extension_specifics` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_specific_value_translations
# ------------------------------------------------------------

CREATE TABLE `extension_specific_value_translations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `value_id` int(10) unsigned NOT NULL,
  `locale_id` int(10) unsigned NOT NULL,
  `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_specific_value_translations_value_id_index` (`value_id`),
  KEY `extension_specific_value_translations_locale_id_index` (`locale_id`),
  CONSTRAINT `extension_specific_value_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_specific_value_translations_value_id_foreign` FOREIGN KEY (`value_id`) REFERENCES `extension_specific_values` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_specific_values
# ------------------------------------------------------------

CREATE TABLE `extension_specific_values` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `specific_id` int(10) unsigned NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_specific_values_specific_id_index` (`specific_id`),
  KEY `extension_specific_values_code_index` (`code`),
  CONSTRAINT `extension_specific_values_specific_id_foreign` FOREIGN KEY (`specific_id`) REFERENCES `extension_specifics` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_specifics
# ------------------------------------------------------------

CREATE TABLE `extension_specifics` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_statement_translations
# ------------------------------------------------------------

CREATE TABLE `extension_statement_translations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `statement_id` int(10) unsigned NOT NULL,
  `locale_id` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_statement_translations_statement_id_foreign` (`statement_id`),
  KEY `extension_statement_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_statement_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_statement_translations_statement_id_foreign` FOREIGN KEY (`statement_id`) REFERENCES `extension_statements` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump extension_statements
# ------------------------------------------------------------

CREATE TABLE `extension_statements` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `extension_id` int(11) unsigned NOT NULL,
  `type` enum('short_desc','advantage') COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_statements_extension_id_foreign` (`extension_id`),
  CONSTRAINT `extension_statements_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_status
# ------------------------------------------------------------

CREATE TABLE `extension_status` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_status_translations
# ------------------------------------------------------------

CREATE TABLE `extension_status_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `status_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_status_translations_status_id_foreign` (`status_id`) USING BTREE,
  KEY `extension_status_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_status_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_status_translations_status_id_foreign` FOREIGN KEY (`status_id`) REFERENCES `extension_status` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_translations
# ------------------------------------------------------------

CREATE TABLE `extension_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `extension_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `caption` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `additional_caption` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `catchword` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `additional_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_translations_extension_id_foreign` (`extension_id`) USING BTREE,
  KEY `extension_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_translations_extension_id_foreign` FOREIGN KEY (`extension_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_type_translations
# ------------------------------------------------------------

CREATE TABLE `extension_type_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `type_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `extension_type_translations_type_id_foreign` (`type_id`) USING BTREE,
  KEY `extension_type_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `extension_type_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_type_translations_type_id_foreign` FOREIGN KEY (`type_id`) REFERENCES `extension_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extension_types
# ------------------------------------------------------------

CREATE TABLE `extension_types` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump extensions
# ------------------------------------------------------------

CREATE TABLE `extensions` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(11) unsigned NOT NULL,
  `availability_id` int(11) unsigned DEFAULT NULL,
  `owner_id` int(11) unsigned NOT NULL,
  `type_id` int(11) unsigned NOT NULL,
  `status_id` int(11) unsigned NOT NULL,
  `catchword_id` int(11) unsigned DEFAULT NULL,
  `certification_id` int(11) unsigned DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner_type` enum('tech','service') COLLATE utf8mb4_unicode_ci NOT NULL,
  `company` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `email_customer` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
  `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `documentation_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dependence_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facebook_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `youtube_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `twitter_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `demo_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `extension_product_id_foreign` (`product_id`),
  KEY `extension_owner_id_foreign` (`owner_id`),
  KEY `extension_type_id_foreign` (`type_id`),
  KEY `extension_availability_id_foreign` (`availability_id`),
  KEY `extension_status_id_foreign` (`status_id`),
  KEY `extension_certification_id_foreign` (`certification_id`),
  KEY `extension_ catchword_id_foreign` (`catchword_id`),
  CONSTRAINT `extension_ catchword_id_foreign` FOREIGN KEY (`catchword_id`) REFERENCES `extension_catchwords` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_availability_id_foreign` FOREIGN KEY (`availability_id`) REFERENCES `extension_availabilities` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_certification_id_foreign` FOREIGN KEY (`certification_id`) REFERENCES `extension_certifications` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_status_id_foreign` FOREIGN KEY (`status_id`) REFERENCES `extension_status` (`id`) ON DELETE CASCADE,
  CONSTRAINT `extension_type_id_foreign` FOREIGN KEY (`type_id`) REFERENCES `extension_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump failed_jobs
# ------------------------------------------------------------

CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text COLLATE utf8_unicode_ci NOT NULL,
  `queue` text COLLATE utf8_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump ffn_di_documents
# ------------------------------------------------------------

CREATE TABLE `ffn_di_documents` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `file` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_exposes
# ------------------------------------------------------------

CREATE TABLE `ffn_di_exposes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `expose_id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `street` varchar(255) NOT NULL,
  `street_number` varchar(255) NOT NULL,
  `zip` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `country` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `api_user_id` varchar(255) NOT NULL,
  `company` varchar(255) NOT NULL,
  `packages_per_month` bigint(20) unsigned NOT NULL,
  `employees` bigint(20) unsigned NOT NULL,
  `area` bigint(20) unsigned NOT NULL,
  `description` longtext,
  `max_volume` bigint(20) unsigned NOT NULL,
  `active` tinyint(1) NOT NULL,
  `active_since` varchar(255) NOT NULL,
  `locked` tinyint(1) NOT NULL DEFAULT '0',
  `ebay_plus` tinyint(1) NOT NULL DEFAULT '0',
  `amazon_prime` tinyint(1) NOT NULL DEFAULT '0',
  `certified` tinyint(1) NOT NULL DEFAULT '0',
  `teased` tinyint(1) NOT NULL DEFAULT '0',
  `logo` varchar(255) DEFAULT NULL,
  `pre_fba` tinyint(1) NOT NULL DEFAULT '0',
  `max_cutoff` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_failed_jobs
# ------------------------------------------------------------

CREATE TABLE `ffn_di_failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_migrations
# ------------------------------------------------------------

CREATE TABLE `ffn_di_migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_user_fulfillers
# ------------------------------------------------------------

CREATE TABLE `ffn_di_user_fulfillers` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `fulfiller_id` varchar(255) NOT NULL,
  `assigned_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_user_merchants
# ------------------------------------------------------------

CREATE TABLE `ffn_di_user_merchants` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `merchant_id` varchar(255) NOT NULL,
  `assigned_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_user_roles
# ------------------------------------------------------------

CREATE TABLE `ffn_di_user_roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `role` varchar(255) NOT NULL,
  `assigned_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_user_warehouse_stats
# ------------------------------------------------------------

CREATE TABLE `ffn_di_user_warehouse_stats` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `api_user_id` varchar(255) NOT NULL,
  `role` enum('Fulfiller','Merchant') NOT NULL,
  `type` enum('createdInbounds','createdOutbounds','shippedOutbounds') NOT NULL,
  `warehouse` varchar(255) NOT NULL,
  `amount` int(10) unsigned NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ffn_di_user_warehouse_stats_warehouse_date_index` (`warehouse`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ffn_di_users
# ------------------------------------------------------------

CREATE TABLE `ffn_di_users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL,
  `api_user_id` varchar(255) NOT NULL,
  `amazon_prime_by_seller` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ffn_di_users_api_user_id_index` (`api_user_id`),
  KEY `ffn_di_users_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump fulfillment_users
# ------------------------------------------------------------

CREATE TABLE `fulfillment_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `account_id` int(10) unsigned NOT NULL,
  `production_user_id` varchar(50) NOT NULL,
  `sandbox_user_id` varchar(50) NOT NULL,
  `tariff` varchar(50) DEFAULT NULL,
  `ebay_fulfillment_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump hosting_mail_queue
# ------------------------------------------------------------

CREATE TABLE `hosting_mail_queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mail_template` int(11) NOT NULL COMMENT 'const MAILVORLAGE_(*) in PHP',
  `reference_id` int(11) NOT NULL COMMENT 'PK in reference_table',
  `reference_name` varchar(45) DEFAULT NULL COMMENT 'only a hint',
  `additional_data` json DEFAULT NULL,
  `status` enum('new','sent','error') NOT NULL,
  `unique_key` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'UTC',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'UTC',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UX__hosting_mail_queue__unique_key` (`unique_key`),
  KEY `IX_hosting_mail_cron_status` (`status`),
  KEY `IX_hmq_reference_id_reference_name` (`reference_id`,`reference_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump locales
# ------------------------------------------------------------

CREATE TABLE `locales` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `locale` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump mailchimp_campaigns
# ------------------------------------------------------------

CREATE TABLE `mailchimp_campaigns` (
  `id` varchar(50) NOT NULL,
  `title` varchar(255) NOT NULL,
  `type` varchar(50) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `url` varchar(255) NOT NULL,
  `recipients` json NOT NULL,
  `send_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump mc_sync_email_tags
# ------------------------------------------------------------

CREATE TABLE `mc_sync_email_tags` (
  `email_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL,
  KEY `mc_sync_email_tags_email_id_foreign` (`email_id`),
  KEY `mc_sync_email_tags_tag_id_foreign` (`tag_id`),
  CONSTRAINT `mc_sync_email_tags_email_id_foreign` FOREIGN KEY (`email_id`) REFERENCES `mc_sync_emails` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mc_sync_email_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `mc_sync_tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump mc_sync_emails
# ------------------------------------------------------------

CREATE TABLE `mc_sync_emails` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) DEFAULT NULL,
  `type` int(10) unsigned NOT NULL DEFAULT '0',
  `action_needed` int(10) unsigned NOT NULL DEFAULT '0',
  `last_sync` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mc_sync_emails_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_failed_jobs
# ------------------------------------------------------------

CREATE TABLE `mc_sync_failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_local_type_data
# ------------------------------------------------------------

CREATE TABLE `mc_sync_local_type_data` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `email_id` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mc_sync_local_type_data_mc_sync_emails_id_fk` (`email_id`),
  CONSTRAINT `mc_sync_local_type_data_mc_sync_emails_id_fk` FOREIGN KEY (`email_id`) REFERENCES `mc_sync_emails` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_migrations
# ------------------------------------------------------------

CREATE TABLE `mc_sync_migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_newsletter_histories
# ------------------------------------------------------------

CREATE TABLE `mc_sync_newsletter_histories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mc_id` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `status` int(10) unsigned NOT NULL DEFAULT '0',
  `link` varchar(255) NOT NULL,
  `sent_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mc_sync_newsletter_histories_mc_id_unique` (`mc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_newsletter_history_segment
# ------------------------------------------------------------

CREATE TABLE `mc_sync_newsletter_history_segment` (
  `newsletter_history_id` int(10) unsigned NOT NULL,
  `segment_id` int(10) unsigned NOT NULL,
  KEY `mc_sync_newsletter_history_segment_segment_id_foreign` (`segment_id`),
  KEY `mc_sync_newsletter_his_seg_mc_sync_news_histories_id_fk` (`newsletter_history_id`),
  CONSTRAINT `mc_sync_newsletter_his_seg_mc_sync_news_histories_id_fk` FOREIGN KEY (`newsletter_history_id`) REFERENCES `mc_sync_newsletter_histories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `mc_sync_newsletter_history_segment_mc_sync_segments_id_fk` FOREIGN KEY (`segment_id`) REFERENCES `mc_sync_segments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_newsletter_subscriptions
# ------------------------------------------------------------

CREATE TABLE `mc_sync_newsletter_subscriptions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `newsletter_type_id` int(10) unsigned NOT NULL,
  `email_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `mc_sync_nl_subs_email_id_newsletter_type_id_index` (`email_id`),
  KEY `mc_sync_newsletter_subscriptions_mc_sync_newsletter_types_id_fk` (`newsletter_type_id`),
  CONSTRAINT `mc_sync_newsletter_sub_mc_sync_emails_id_fk` FOREIGN KEY (`email_id`) REFERENCES `mc_sync_emails` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `mc_sync_newsletter_subscriptions_mc_sync_newsletter_types_id_fk` FOREIGN KEY (`newsletter_type_id`) REFERENCES `mc_sync_newsletter_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_newsletter_types
# ------------------------------------------------------------

CREATE TABLE `mc_sync_newsletter_types` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `interest_code` varchar(255) NOT NULL,
  `description` longtext,
  `sort` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_segment_tag
# ------------------------------------------------------------

CREATE TABLE `mc_sync_segment_tag` (
  `segment_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL,
  KEY `mc_sync_segment_tag_tag_id_foreign` (`tag_id`),
  KEY `mc_sync_segment_tag_mc_sync_segments_id_fk` (`segment_id`),
  CONSTRAINT `mc_sync_segment_tag_mc_sync_segments_id_fk` FOREIGN KEY (`segment_id`) REFERENCES `mc_sync_segments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `mc_sync_segment_tag_mc_sync_tags_id_fk` FOREIGN KEY (`tag_id`) REFERENCES `mc_sync_tags` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_segments
# ------------------------------------------------------------

CREATE TABLE `mc_sync_segments` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mc_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mc_sync_segments_mc_id_unique` (`mc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump mc_sync_tags
# ------------------------------------------------------------

CREATE TABLE `mc_sync_tags` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mc_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `longname` text,
  `description` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mc_sync_tags_mc_id_unique` (`mc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump newsletter_blacklist_optout
# ------------------------------------------------------------

CREATE TABLE `newsletter_blacklist_optout` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `removed_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump newslettersettingstmp
# ------------------------------------------------------------

CREATE TABLE `newslettersettingstmp` (
  `rid` int(13) NOT NULL AUTO_INCREMENT,
  `account_id` int(13) DEFAULT NULL,
  `status` char(20) DEFAULT NULL,
  `interests` char(250) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`rid`),
  KEY `newlsettersettingstmp_status_index` (`status`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;





# Tabellen-Dump orderdataprocessing
# ------------------------------------------------------------

CREATE TABLE `orderdataprocessing` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump orderdataprocessingfulfillment
# ------------------------------------------------------------

CREATE TABLE `orderdataprocessingfulfillment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump orderdataprocessingfulfillmenthistory
# ------------------------------------------------------------

CREATE TABLE `orderdataprocessingfulfillmenthistory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `accepted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `find_out_who_inserts` AFTER INSERT ON `orderdataprocessingfulfillmenthistory` FOR EACH ROW BEGIN
    INSERT INTO orderdataprocessingfulfillmenthistorysqluser SET id = NEW.id, account_id = NEW.account_id, created_at = NEW.created_at, accepted_at = NEW.accepted_at, sql_user = USER();
end */;;
DELIMITER ;


# Tabellen-Dump orderdataprocessingfulfillmenthistorysqluser
# ------------------------------------------------------------

CREATE TABLE `orderdataprocessingfulfillmenthistorysqluser` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `accepted_at` datetime DEFAULT NULL,
  `sql_user` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump orderdataprocessinghistory
# ------------------------------------------------------------

CREATE TABLE `orderdataprocessinghistory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `accepted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump portfolio_absatzmarkt
# ------------------------------------------------------------

CREATE TABLE `portfolio_absatzmarkt` (
  `kAbsatzmarkt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`kAbsatzmarkt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angebot
# ------------------------------------------------------------

CREATE TABLE `portfolio_angebot` (
  `kAngebot` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAbsatzmarkt` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cAngebotsnummer` varchar(100) DEFAULT NULL,
  `cNameIntern` varchar(255) DEFAULT NULL,
  `cBeschreibungIntern` text,
  `nAktiv` int(11) NOT NULL DEFAULT '0',
  `dAktualisiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAngebot`),
  KEY `kAbsatzmarkt` (`kAbsatzmarkt`),
  KEY `kAbsatzmarkt_2` (`kAbsatzmarkt`),
  KEY `kAdminLogin` (`kAdminLogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angeboti18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_angeboti18n` (
  `kAngebot` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  PRIMARY KEY (`kAngebot`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angebotleistung
# ------------------------------------------------------------

CREATE TABLE `portfolio_angebotleistung` (
  `kAngebot` int(10) unsigned NOT NULL,
  `kLeistung` int(10) unsigned NOT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`kAngebot`,`kLeistung`),
  KEY `kLeistung` (`kLeistung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angebotobjekt
# ------------------------------------------------------------

CREATE TABLE `portfolio_angebotobjekt` (
  `kAngebotObjekt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAngebot` int(10) unsigned NOT NULL,
  `kObjekt` int(10) unsigned NOT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cObjektID` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAngebotObjekt`),
  UNIQUE KEY `UC_objectID` (`kAngebot`,`cObjektID`),
  KEY `kAngebot` (`kAngebot`),
  KEY `kObjekt` (`kObjekt`),
  KEY `cObjektID` (`cObjektID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angebotobjektwert
# ------------------------------------------------------------

CREATE TABLE `portfolio_angebotobjektwert` (
  `kAngebotObjekt` int(10) unsigned NOT NULL,
  `kEigenschaft` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cWertVarchar` varchar(255) DEFAULT NULL,
  `nWertInt` int(11) DEFAULT NULL,
  `fWertDecimal` decimal(25,6) DEFAULT NULL,
  `dWertDatetime` datetime DEFAULT NULL,
  `cWertText` text,
  `kWertlisteWert` int(11) DEFAULT NULL,
  PRIMARY KEY (`kAngebotObjekt`,`kEigenschaft`,`kSprache`),
  KEY `kEigenschaft` (`kEigenschaft`),
  KEY `kWertlisteWert` (`kWertlisteWert`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_angebotplatzierung
# ------------------------------------------------------------

CREATE TABLE `portfolio_angebotplatzierung` (
  `kAngebot` int(10) unsigned NOT NULL,
  `kPlatzierung` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kAngebot`,`kPlatzierung`),
  KEY `kPlatzierung` (`kPlatzierung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_anwendung
# ------------------------------------------------------------

CREATE TABLE `portfolio_anwendung` (
  `kAnwendung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cNameIntern` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kAnwendung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_anwendungi18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_anwendungi18n` (
  `kAnwendung` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  PRIMARY KEY (`kAnwendung`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_distributionstyp
# ------------------------------------------------------------

CREATE TABLE `portfolio_distributionstyp` (
  `kDistributionstyp` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cNameIntern` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kDistributionstyp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_distributionstypi18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_distributionstypi18n` (
  `kDistributionstyp` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  PRIMARY KEY (`kDistributionstyp`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_eigenschaft
# ------------------------------------------------------------

CREATE TABLE `portfolio_eigenschaft` (
  `kEigenschaft` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kObjekt` int(10) unsigned NOT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `kWertliste` int(10) unsigned DEFAULT NULL,
  `cFeldtyp` enum('Ganzzahl','Fließkommazahl','Kurztext','Langtext','Zeitpunkt','Bool','Wertliste') NOT NULL,
  `cNameIntern` varchar(255) NOT NULL,
  `cEigenschaftID` varchar(255) NOT NULL,
  `cBeschreibung` varchar(255) DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kEigenschaft`),
  KEY `kObjekt` (`kObjekt`),
  KEY `cEigenschaftID` (`cEigenschaftID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_leistung
# ------------------------------------------------------------

CREATE TABLE `portfolio_leistung` (
  `kLeistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kProduktfamilie` int(10) unsigned DEFAULT NULL,
  `kAnwendung` int(10) unsigned DEFAULT NULL,
  `kDistributionstyp` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cLeistungsnummer` varchar(100) DEFAULT NULL,
  `cNameIntern` varchar(255) DEFAULT NULL,
  `cBeschreibungIntern` text,
  `nAktiv` int(11) NOT NULL DEFAULT '0',
  `dAktualisiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kLeistung`),
  KEY `kProduktfamilie` (`kProduktfamilie`),
  KEY `kAnwendung` (`kAnwendung`),
  KEY `kDistributionstyp` (`kDistributionstyp`),
  KEY `kAdminLogin` (`kAdminLogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_leistungi18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_leistungi18n` (
  `kLeistung` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  PRIMARY KEY (`kLeistung`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_leistungobjekt
# ------------------------------------------------------------

CREATE TABLE `portfolio_leistungobjekt` (
  `kLeistungObjekt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kLeistung` int(10) unsigned NOT NULL,
  `kObjekt` int(10) unsigned NOT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cObjektID` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kLeistungObjekt`),
  UNIQUE KEY `UC_objectID` (`kLeistung`,`cObjektID`),
  KEY `kLeistung` (`kLeistung`),
  KEY `kObjekt` (`kObjekt`),
  KEY `cObjektID` (`cObjektID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_leistungobjektwert
# ------------------------------------------------------------

CREATE TABLE `portfolio_leistungobjektwert` (
  `kLeistungObjekt` int(10) unsigned NOT NULL,
  `kEigenschaft` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cWertVarchar` varchar(255) DEFAULT NULL,
  `nWertInt` int(11) DEFAULT NULL,
  `fWertDecimal` decimal(25,6) DEFAULT NULL,
  `dWertDatetime` datetime DEFAULT NULL,
  `cWertText` text,
  `kWertlisteWert` int(11) DEFAULT NULL,
  PRIMARY KEY (`kLeistungObjekt`,`kEigenschaft`,`kSprache`),
  KEY `kEigenschaft` (`kEigenschaft`),
  KEY `kWertlisteWert` (`kWertlisteWert`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_objekt
# ------------------------------------------------------------

CREATE TABLE `portfolio_objekt` (
  `kObjekt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cNameIntern` varchar(255) NOT NULL,
  `cBeschreibung` varchar(255) DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kObjekt`),
  KEY `kObjekt` (`kObjekt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_platzierung
# ------------------------------------------------------------

CREATE TABLE `portfolio_platzierung` (
  `kPlatzierung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kPlatzierung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_produktfamilie
# ------------------------------------------------------------

CREATE TABLE `portfolio_produktfamilie` (
  `kProduktfamilie` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `cNameIntern` varchar(255) DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kProduktfamilie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_produktfamiliei18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_produktfamiliei18n` (
  `kProduktfamilie` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  PRIMARY KEY (`kProduktfamilie`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_sprache
# ------------------------------------------------------------

CREATE TABLE `portfolio_sprache` (
  `kSprache` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cNameDE` varchar(100) DEFAULT NULL,
  `cNameEN` varchar(100) DEFAULT NULL,
  `cLanguageTag` varchar(10) DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned DEFAULT NULL,
  `nStandard` tinyint(3) unsigned DEFAULT NULL,
  `nSort` int(11) DEFAULT NULL,
  PRIMARY KEY (`kSprache`),
  KEY `cLanguageTag` (`cLanguageTag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_wertliste
# ------------------------------------------------------------

CREATE TABLE `portfolio_wertliste` (
  `kWertliste` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cBeschreibung` varchar(255) DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kWertliste`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_wertlistewert
# ------------------------------------------------------------

CREATE TABLE `portfolio_wertlistewert` (
  `kWertlisteWert` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kWertliste` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(10) unsigned NOT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kWertlisteWert`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump portfolio_wertlistewerti18n
# ------------------------------------------------------------

CREATE TABLE `portfolio_wertlistewerti18n` (
  `kWertlisteWert` int(10) unsigned NOT NULL,
  `kSprache` int(10) unsigned NOT NULL,
  `cWert` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kWertlisteWert`,`kSprache`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump pos_payment_docs
# ------------------------------------------------------------

CREATE TABLE `pos_payment_docs` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `payment_id` int(10) NOT NULL,
  `path` varchar(192) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump pos_payment_orders
# ------------------------------------------------------------

CREATE TABLE `pos_payment_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pos_payment_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `price` double(16,4) NOT NULL,
  `booked_at` date DEFAULT NULL,
  `is_jtl` tinyint(4) NOT NULL DEFAULT '0',
  `terminated_by` varchar(50) NOT NULL DEFAULT '',
  `terminated_on` date DEFAULT NULL,
  `terminated_to` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pos_payment_id_idx` (`pos_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump pos_payment_providers
# ------------------------------------------------------------

CREATE TABLE `pos_payment_providers` (
  `id` varchar(192) NOT NULL,
  `name` varchar(192) NOT NULL,
  `cost` decimal(16,4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump pos_payments
# ------------------------------------------------------------

CREATE TABLE `pos_payments` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `account_id` int(10) NOT NULL,
  `device_id` int(11) NOT NULL,
  `payment_provider_id` varchar(192) NOT NULL,
  `confirmed_by` varchar(192) NOT NULL,
  `state` enum('pending','approved','denied') NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `pos_payments_device_id` (`device_id`),
  KEY `pos_payments_payment_provider_id` (`payment_provider_id`),
  CONSTRAINT `pos_payments_device_id` FOREIGN KEY (`device_id`) REFERENCES `tdevice` (`kDevice`) ON DELETE NO ACTION,
  CONSTRAINT `pos_payments_payment_provider_id` FOREIGN KEY (`payment_provider_id`) REFERENCES `pos_payment_providers` (`id`) ON DELETE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump programm_bereiche
# ------------------------------------------------------------

CREATE TABLE `programm_bereiche` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `programm_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bereich_programm` (`programm_id`),
  CONSTRAINT `bereich_programm` FOREIGN KEY (`programm_id`) REFERENCES `programme` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump programm_status
# ------------------------------------------------------------

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



# Tabellen-Dump programm_taccount
# ------------------------------------------------------------

CREATE TABLE `programm_taccount` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `programm_id` int(11) unsigned NOT NULL,
  `programm_status_id` int(11) unsigned DEFAULT NULL,
  `taccount_id` int(10) unsigned NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `taccount_programm` (`taccount_id`,`programm_id`),
  KEY `programm` (`programm_id`),
  KEY `status` (`programm_status_id`),
  CONSTRAINT `programm` FOREIGN KEY (`programm_id`) REFERENCES `programme` (`id`) ON DELETE CASCADE,
  CONSTRAINT `status` FOREIGN KEY (`programm_status_id`) REFERENCES `programm_status` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_history_INSERT` AFTER INSERT ON `programm_taccount` FOR EACH ROW INSERT INTO programm_taccount_history (id, programm_id, programm_status_id, taccount_id, created_at, change_operation, change_at)
    VALUES (NEW.id, NEW.programm_id, NEW.programm_status_id, NEW.taccount_id, NEW.created_at, 'INSERT', NOW()) */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_history_UPDATE` AFTER UPDATE ON `programm_taccount` FOR EACH ROW INSERT INTO programm_taccount_history (id, programm_id, programm_status_id, taccount_id, created_at, change_operation, change_at)
    VALUES (NEW.id, NEW.programm_id, NEW.programm_status_id, NEW.taccount_id, NEW.created_at, 'UPDATE', NOW()) */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_history_DELETE` AFTER DELETE ON `programm_taccount` FOR EACH ROW INSERT INTO programm_taccount_history (id, programm_id, programm_status_id, taccount_id, created_at, change_operation, change_at)
    VALUES (OLD.id, OLD.programm_id, OLD.programm_status_id, OLD.taccount_id, OLD.created_at, 'DELETE', NOW()) */;;
DELIMITER ;


# Tabellen-Dump programm_taccount_bereich
# ------------------------------------------------------------

CREATE TABLE `programm_taccount_bereich` (
  `programm_taccount_id` int(10) unsigned NOT NULL,
  `bereich_id` int(10) unsigned NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`programm_taccount_id`,`bereich_id`),
  KEY `programm_taccount_bereich__fk` (`bereich_id`),
  CONSTRAINT `programm_taccount_bereich__fk` FOREIGN KEY (`bereich_id`) REFERENCES `programm_bereiche` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `programm_taccount_bereich_fk` FOREIGN KEY (`programm_taccount_id`) REFERENCES `programm_taccount` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_bereich_history_INSERT` AFTER INSERT ON `programm_taccount_bereich` FOR EACH ROW INSERT INTO programm_taccount_bereich_history (programm_taccount_id, bereich_id, created_at, change_operation, change_at) VALUES (NEW.programm_taccount_id, NEW.bereich_id, NEW.created_at, 'INSERT', NOW()) */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_bereich_history_UPDATE` AFTER UPDATE ON `programm_taccount_bereich` FOR EACH ROW INSERT INTO programm_taccount_bereich_history (programm_taccount_id, bereich_id, created_at, change_operation, change_at)
    VALUES (NEW.programm_taccount_id, NEW.bereich_id, NEW.created_at, 'UPDATE', NOW()) */;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `programm_taccount_bereich_history_DELETE` AFTER DELETE ON `programm_taccount_bereich` FOR EACH ROW INSERT INTO programm_taccount_bereich_history (programm_taccount_id, bereich_id, created_at, change_operation, change_at)
    VALUES (OLD.programm_taccount_id, OLD.bereich_id, OLD.created_at, 'DELETE', NOW()) */;;
DELIMITER ;


# Tabellen-Dump programm_taccount_bereich_history
# ------------------------------------------------------------

CREATE TABLE `programm_taccount_bereich_history` (
  `programm_taccount_id` int(10) unsigned DEFAULT NULL,
  `bereich_id` int(10) unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `change_operation` varchar(20) DEFAULT NULL,
  `change_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump programm_taccount_history
# ------------------------------------------------------------

CREATE TABLE `programm_taccount_history` (
  `id` int(10) unsigned DEFAULT NULL,
  `programm_id` int(10) unsigned DEFAULT NULL,
  `programm_status_id` int(10) unsigned DEFAULT NULL,
  `taccount_id` int(10) unsigned DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `change_operation` varchar(20) DEFAULT NULL,
  `change_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump programme
# ------------------------------------------------------------

CREATE TABLE `programme` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `short_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump reseller_interface_domain_price_history
# ------------------------------------------------------------

CREATE TABLE `reseller_interface_domain_price_history` (
  `reseller_interface_domain_id` int(11) unsigned NOT NULL,
  `product_type` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
  `runtime` int(11) NOT NULL,
  `runtime_price` decimal(30,2) NOT NULL,
  `onetime_price` decimal(30,2) NOT NULL,
  `changed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump reseller_interface_domain_prices
# ------------------------------------------------------------

CREATE TABLE `reseller_interface_domain_prices` (
  `reseller_interface_domain_id` int(11) unsigned NOT NULL,
  `product_type` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
  `runtime` int(11) NOT NULL,
  `runtime_price` decimal(30,2) NOT NULL,
  `onetime_price` decimal(30,2) NOT NULL,
  UNIQUE KEY `domain_id_product_type_runtime_unique` (`reseller_interface_domain_id`,`product_type`,`runtime`),
  KEY `product_type_idx` (`product_type`),
  KEY `runtime_idx` (`runtime`),
  KEY `reseller_interface_domain_id_idx` (`reseller_interface_domain_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump reseller_interface_domains
# ------------------------------------------------------------

CREATE TABLE `reseller_interface_domains` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `tld` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cancellation_period` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tld_unique` (`tld`),
  KEY `tld_idx` (`tld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump returndebitnote
# ------------------------------------------------------------

CREATE TABLE `returndebitnote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoice_id` int(11) NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `invoice_id` (`invoice_id`),
  KEY `paid` (`paid`),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump returndebitnotes_mail
# ------------------------------------------------------------

CREATE TABLE `returndebitnotes_mail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `returndebitnote_id` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `returndebitnote_id` (`returndebitnote_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump servicepartner_rating_public_type_translations
# ------------------------------------------------------------

CREATE TABLE `servicepartner_rating_public_type_translations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `public_type_id` int(10) unsigned NOT NULL,
  `locale_id` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `locale_id` (`locale_id`),
  KEY `sp_rating_public_type_translations_public_type_id_foreign` (`public_type_id`),
  CONSTRAINT `servicepartner_rating_public_type_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `sp_rating_public_type_translations_public_type_id_foreign` FOREIGN KEY (`public_type_id`) REFERENCES `servicepartner_rating_public_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump servicepartner_rating_public_types
# ------------------------------------------------------------

CREATE TABLE `servicepartner_rating_public_types` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump servicepartner_ratings
# ------------------------------------------------------------

CREATE TABLE `servicepartner_ratings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `servicepartner_id` int(10) unsigned NOT NULL,
  `account_id` int(10) unsigned NOT NULL,
  `rating` int(10) unsigned NOT NULL DEFAULT '0',
  `locale_id` int(10) unsigned NOT NULL,
  `text` text NOT NULL,
  `is_active` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `is_conflict` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `public_type_id` int(10) unsigned NOT NULL,
  `collaboration_started_at` date DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `servicepartner_id` (`servicepartner_id`),
  KEY `account_id` (`account_id`),
  KEY `is_active` (`is_active`),
  KEY `rating` (`rating`),
  KEY `locale_id` (`locale_id`),
  KEY `public_type_id` (`public_type_id`),
  KEY `is_conflict` (`is_conflict`),
  CONSTRAINT `servicepartner_ratings_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `servicepartner_ratings_public_type_id_foreign` FOREIGN KEY (`public_type_id`) REFERENCES `servicepartner_rating_public_types` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump store_connector_category_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_category_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_category_linkings_host_id_index` (`host_id`),
  CONSTRAINT `store_connector_category_linkings_endpoint_id_foreign` FOREIGN KEY (`endpoint_id`) REFERENCES `extension_categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump store_connector_image_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_image_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_image_linkings_host_id_index` (`host_id`),
  CONSTRAINT `store_connector_image_linkings_endpoint_id_foreign` FOREIGN KEY (`endpoint_id`) REFERENCES `extension_images` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump store_connector_manufacturer_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_manufacturer_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_manufacturer_linkings_host_id_index` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump store_connector_migrations
# ------------------------------------------------------------

CREATE TABLE `store_connector_migrations` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump store_connector_product_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_product_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_product_linkings_host_id_index` (`host_id`),
  CONSTRAINT `store_connector_product_linkings_endpoint_id_foreign` FOREIGN KEY (`endpoint_id`) REFERENCES `extensions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump store_connector_specific_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_specific_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_specific_linkings_host_id_index` (`host_id`),
  CONSTRAINT `store_connector_specific_linkings_endpoint_id_foreign` FOREIGN KEY (`endpoint_id`) REFERENCES `extension_specifics` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump store_connector_specific_value_linkings
# ------------------------------------------------------------

CREATE TABLE `store_connector_specific_value_linkings` (
  `endpoint_id` int(10) unsigned NOT NULL,
  `host_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`endpoint_id`),
  KEY `store_connector_specific_value_linkings_host_id_index` (`host_id`),
  CONSTRAINT `store_connector_specific_value_linkings_endpoint_id_foreign` FOREIGN KEY (`endpoint_id`) REFERENCES `extension_specific_values` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump support_discounts
# ------------------------------------------------------------

CREATE TABLE `support_discounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `support_id` int(10) unsigned NOT NULL,
  `discount` double(4,2) NOT NULL,
  `created_at` date NOT NULL,
  `valid_until_at` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `support_id` (`support_id`),
  CONSTRAINT `support_discounts_support_id` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump support_translations
# ------------------------------------------------------------

CREATE TABLE `support_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `support_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `support_id` (`support_id`,`locale_id`),
  KEY `supporty_translations_locale_id_foreign` (`locale_id`),
  CONSTRAINT `support_translations_locale_id_foreign` FOREIGN KEY (`locale_id`) REFERENCES `locales` (`id`) ON DELETE CASCADE,
  CONSTRAINT `support_translations_support_id_foreign` FOREIGN KEY (`support_id`) REFERENCES `supports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump supports
# ------------------------------------------------------------

CREATE TABLE `supports` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `hours_reaction_time` int(11) NOT NULL DEFAULT '0',
  `price` decimal(15,4) DEFAULT '0.0000',
  `has_phone_support` tinyint(4) NOT NULL DEFAULT '0',
  `has_callback_service` tinyint(4) NOT NULL DEFAULT '0',
  `has_mail_service` tinyint(4) NOT NULL DEFAULT '0',
  `is_bookable` tinyint(4) unsigned DEFAULT '0',
  `is_visible` tinyint(4) unsigned DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump t3rdpartybuchung
# ------------------------------------------------------------

CREATE TABLE `t3rdpartybuchung` (
  `k3rdPartyBuchung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `c3rdParty` varchar(50) DEFAULT NULL,
  `cLeistung` varchar(255) DEFAULT NULL,
  `cLeistungAddOnJSON` text,
  `cBuchungResultJSON` text,
  `cOrderId` varchar(50) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`k3rdPartyBuchung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump t3rdpartycall
# ------------------------------------------------------------

CREATE TABLE `t3rdpartycall` (
  `k3rdPartyCall` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `c3rdParty` varchar(50) DEFAULT NULL,
  `cTrigger` varchar(255) DEFAULT NULL,
  `cCall` varchar(50) DEFAULT NULL,
  `cStatusConnection` varchar(20) DEFAULT NULL,
  `cStatus` varchar(20) DEFAULT NULL,
  `cRequest` text,
  `cResponse` text,
  `cResult` text,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`k3rdPartyCall`),
  KEY `t3rdpartycall_dErstellt_index` (`dErstellt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungprodukt
# ------------------------------------------------------------

CREATE TABLE `tabrechnungprodukt` (
  `kAbrechnungProdukt` tinyint(3) unsigned NOT NULL,
  `cName` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`kAbrechnungProdukt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungtransaktionen
# ------------------------------------------------------------

CREATE TABLE `tabrechnungtransaktionen` (
  `kAbrechnungTransaktionen` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAbrechnungProdukt` tinyint(3) unsigned DEFAULT NULL,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kKey` int(10) unsigned NOT NULL DEFAULT '0',
  `cAbrechnungsmonat` varchar(10) DEFAULT NULL,
  `nTransaktionen` int(10) unsigned DEFAULT NULL,
  `nTransaktionen2` int(10) unsigned DEFAULT NULL,
  `dAbrufZeitpunkt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAbrechnungTransaktionen`),
  UNIQUE KEY `tabrechnungtransaktionen_unique_uindex` (`kAbrechnungProdukt`,`kAccount`,`cAbrechnungsmonat`,`kKey`),
  KEY `tabrechnungtransaktionen_kAccount_cAbrechnungsmonat_index` (`kAccount`,`cAbrechnungsmonat`),
  KEY `tabrechnungtransaktionen_kKey_index` (`kKey`),
  KEY `tabrechnungtransaktionen_jobcheck_index` (`kAbrechnungProdukt`,`cAbrechnungsmonat`,`dAbrufZeitpunkt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungtransaktionenmeta
# ------------------------------------------------------------

CREATE TABLE `tabrechnungtransaktionenmeta` (
  `kAbrechnungTransaktionenMeta` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAbrechnungTransaktionen` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cValue` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kAbrechnungTransaktionenMeta`),
  KEY `tabrechnungtransaktionenmeta_kAbrechnungTransaktionen_index` (`kAbrechnungTransaktionen`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungtransaktionenstats
# ------------------------------------------------------------

CREATE TABLE `tabrechnungtransaktionenstats` (
  `kAbrechnungProdukt` tinyint(3) unsigned DEFAULT NULL,
  `cAbrechnungsmonat` varchar(10) DEFAULT NULL,
  `nKunden` int(10) unsigned DEFAULT NULL,
  `nKundenAktiv` int(11) NOT NULL DEFAULT '0',
  `nTransaktionen` int(10) unsigned DEFAULT NULL,
  `fDauerMin` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungvouchersabgerechnet
# ------------------------------------------------------------

CREATE TABLE `tabrechnungvouchersabgerechnet` (
  `voucher_id` varchar(25) NOT NULL,
  `dZeitpunkt` datetime DEFAULT NULL,
  PRIMARY KEY (`voucher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tabrechnungvouchersevents
# ------------------------------------------------------------

CREATE TABLE `tabrechnungvouchersevents` (
  `kAbrechnungVouchersEvents` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `voucher_id` varchar(25) DEFAULT NULL,
  `cGutscheinnummer` varchar(100) DEFAULT NULL,
  `cEvent` enum('Activation','Recharge','Deactivation','Delete') DEFAULT NULL,
  `fWert` decimal(12,2) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAbrechnungVouchersEvents`),
  KEY `tabrechnungvouchersevents_kAccount_dErstellt_index` (`kAccount`,`dErstellt`),
  KEY `tabrechnungvouchersevents_voucher_id_cEvent_index` (`voucher_id`,`cEvent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `accountpruefung` AFTER INSERT ON `taccount` FOR EACH ROW BEGIN
INSERT INTO taccountpruefung(`kAccount`) VALUES (NEW.`kAccount`);
END */;;
DELIMITER ;


# Tabellen-Dump taccount_kommentare
# ------------------------------------------------------------

CREATE TABLE `taccount_kommentare` (
  `kKommentar` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kAdminLogin` int(11) NOT NULL,
  `cKommentar` longtext NOT NULL,
  `dErstellt` date NOT NULL,
  `nWichtig` tinyint(4) NOT NULL DEFAULT '0',
  `nBanner` tinyint(4) NOT NULL DEFAULT '0',
  `dUpdated` date DEFAULT NULL,
  PRIMARY KEY (`kKommentar`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump taccount_support
# ------------------------------------------------------------

CREATE TABLE `taccount_support` (
  `kAccount` int(11) NOT NULL,
  `cWaWiVersion` varchar(255) NOT NULL,
  `cMsSQLServerVersion` varchar(255) NOT NULL,
  `cBetriebssystem` varchar(255) NOT NULL,
  `cBetriebsart` varchar(255) NOT NULL,
  `cAmeiseVersion` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump taccountabrechnung
# ------------------------------------------------------------

CREATE TABLE `taccountabrechnung` (
  `kAccount` int(10) unsigned NOT NULL,
  `cDUOAHNr` varchar(30) DEFAULT NULL,
  `cRechnungZahlungstext` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountdatei
# ------------------------------------------------------------

CREATE TABLE `taccountdatei` (
  `kDatei` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) DEFAULT NULL,
  `cDateiname` varchar(255) DEFAULT NULL,
  `cDateityp` varchar(5) DEFAULT NULL,
  `cBeschreibung` varchar(255) DEFAULT NULL,
  `nStatus` tinyint(3) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kDatei`),
  KEY `kAccount` (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccounthierachie
# ------------------------------------------------------------

CREATE TABLE `taccounthierachie` (
  `kAccounthierachie` tinyint(3) unsigned DEFAULT NULL,
  `cName` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountorganisation
# ------------------------------------------------------------

CREATE TABLE `taccountorganisation` (
  `kAccountOrganisation` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kOrganisation` int(10) unsigned NOT NULL DEFAULT '0',
  `kAccounthierachie` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `kAccountverwaltung` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `kAccountumgebung` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nDSGVODeleteMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nTestphaseMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nKaufMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nSupportMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nNewsletterMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nKritischeInfosMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nProgrammteilnahmeMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nKooperationenMoeglich` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `dAktualisiertAm` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccountOrganisation`),
  UNIQUE KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountpruefung
# ------------------------------------------------------------

CREATE TABLE `taccountpruefung` (
  `kPruefung` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `nPruefung` tinyint(4) DEFAULT '0',
  `dPruefung` datetime DEFAULT NULL,
  `nStatus` tinyint(4) NOT NULL DEFAULT '0',
  `nWahrscheinlichkeit` int(11) NOT NULL DEFAULT '0',
  `nKundenkonten` int(10) unsigned DEFAULT '0',
  PRIMARY KEY (`kPruefung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountpruefung_job
# ------------------------------------------------------------

CREATE TABLE `taccountpruefung_job` (
  `kJob` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  PRIMARY KEY (`kJob`),
  KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountpruefung_log
# ------------------------------------------------------------

CREATE TABLE `taccountpruefung_log` (
  `kLog` int(11) NOT NULL AUTO_INCREMENT,
  `kPruefung` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `nWahrscheinlichkeit` int(11) NOT NULL,
  `xMatchingFields` text NOT NULL,
  PRIMARY KEY (`kLog`),
  KEY `kPruefung` (`kPruefung`,`kAccount`,`nWahrscheinlichkeit`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountpruefung_whitelist
# ------------------------------------------------------------

CREATE TABLE `taccountpruefung_whitelist` (
  `kWhitelist` int(11) NOT NULL AUTO_INCREMENT,
  `kAccountA` int(11) NOT NULL DEFAULT '0',
  `kAccountB` int(11) NOT NULL DEFAULT '0',
  `nTyp` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kWhitelist`),
  KEY `kAccountA` (`kAccountA`,`kAccountB`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountregistrierungszweck
# ------------------------------------------------------------

CREATE TABLE `taccountregistrierungszweck` (
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kRegistrierungszweck` tinyint(3) unsigned DEFAULT NULL,
  KEY `taccountregistrierungszweck_kAccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountrolle
# ------------------------------------------------------------

CREATE TABLE `taccountrolle` (
  `kAccountRolle` int(10) unsigned NOT NULL,
  `cName` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`kAccountRolle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountsla
# ------------------------------------------------------------

CREATE TABLE `taccountsla` (
  `kAccountSLA` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) DEFAULT '0',
  `kSLA` int(11) DEFAULT NULL,
  `cKey` varchar(50) DEFAULT NULL,
  `kKey` varchar(50) DEFAULT NULL,
  `dGueltigAb` datetime DEFAULT NULL,
  `dGueltigBis` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccountSLA`),
  KEY `kAccount` (`kAccount`),
  KEY `kSLA` (`kSLA`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountstatsbuha
# ------------------------------------------------------------

CREATE TABLE `taccountstatsbuha` (
  `kAccount` int(10) unsigned NOT NULL,
  `dRechnungErstelltErste` datetime DEFAULT NULL,
  `fRechnungSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fRechnungSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `fRechnungSummeNettoLetzteExklGuthaben` float(10,2) DEFAULT NULL,
  `fRechnungSummeBruttoLetzteExklGuthaben` float(10,2) DEFAULT NULL,
  `dRechnungErstelltLetzte` datetime DEFAULT NULL,
  `nRechnungAnzahl12Monate` smallint(5) unsigned DEFAULT NULL,
  `fRechnungSummeNetto12Monate` float(10,2) DEFAULT NULL,
  `fRechnungSummeBrutto12Monate` float(10,2) DEFAULT NULL,
  `fRechnungSummeNetto12MonateExklGuthaben` float(10,2) DEFAULT NULL,
  `fRechnungSummeBrutto12MonateExklGuthaben` float(10,2) DEFAULT NULL,
  `nRechnungAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `fRechnungSummeNettoGesamt` float(10,2) DEFAULT NULL,
  `fRechnungSummeBruttoGesamt` float(10,2) DEFAULT NULL,
  `fRechnungSummeNettoGesamtExklGuthaben` float(10,2) DEFAULT NULL,
  `fRechnungSummeBruttoGesamtExklGuthaben` float(10,2) DEFAULT NULL,
  `fRechnungRegulaerSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fRechnungRegulaerSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `fRechnungRegulaerSummeNettoLetzteExklGuthaben` float(10,2) DEFAULT NULL,
  `fRechnungRegulaerSummeBruttoLetzteExklGuthaben` float(10,2) DEFAULT NULL,
  `dRechnungRegulaerErstelltLetzte` datetime DEFAULT NULL,
  `fRechnungskorrekturSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fRechnungskorrekturSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `dRechnungskorrekturErstelltLetzte` datetime DEFAULT NULL,
  `fRechnungskorrekturSummeNetto12Monate` float(10,2) DEFAULT NULL,
  `fRechnungskorrekturSummeBrutto12Monate` float(10,2) DEFAULT NULL,
  `nRechnungskorrekturAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `fRechnungskorrekturSummeNettoGesamt` float(10,2) DEFAULT NULL,
  `fRechnungskorrekturSummeBruttoGesamt` float(10,2) DEFAULT NULL,
  `fProvisionSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fProvisionSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `dProvisionErstelltLetzte` datetime DEFAULT NULL,
  `fProvisionSummeNetto12Monate` float(10,2) DEFAULT NULL,
  `fProvisionSummeBrutto12Monate` float(10,2) DEFAULT NULL,
  `nProvisionAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `fProvisionSummeNettoGesamt` float(10,2) DEFAULT NULL,
  `fProvisionSummeBruttoGesamt` float(10,2) DEFAULT NULL,
  `fMahnungSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fMahnungSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `dMahnungErstelltLetzte` datetime DEFAULT NULL,
  `nMahnungAnzahlLetzte12Monate` smallint(5) unsigned DEFAULT NULL,
  `nMahnungAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `fInkassoSummeNettoLetzte` float(10,2) DEFAULT NULL,
  `fInkassoSummeBruttoLetzte` float(10,2) DEFAULT NULL,
  `dInkassoErstelltLetzte` datetime DEFAULT NULL,
  `nInkassoAnzahlLetzte12Monate` smallint(5) unsigned DEFAULT NULL,
  `nInkassoAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `fInkassoSummeNettoGesamt` float(10,2) DEFAULT NULL,
  `fInkassoSummeBruttoGesamt` float(10,2) DEFAULT NULL,
  `dRLSErstelltLetzte` datetime DEFAULT NULL,
  `nRLSErstelltLetzte12Monate` smallint(5) unsigned DEFAULT NULL,
  `nRLSAnzahlGesamt` smallint(5) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountstatsprodukte
# ------------------------------------------------------------

CREATE TABLE `taccountstatsprodukte` (
  `kAccount` int(10) unsigned NOT NULL,
  `cEazyauctionTarif` varchar(50) DEFAULT NULL,
  `dEazyauctionStart` datetime DEFAULT NULL,
  `cSupportTarif` varchar(20) DEFAULT NULL,
  `dSupportStart` datetime DEFAULT NULL,
  `cTrackAndTraceTarif` varchar(20) DEFAULT NULL,
  `dTrackAndTraceStart` datetime DEFAULT NULL,
  `nSearchTarife` smallint(5) unsigned DEFAULT '0',
  `cSearchURLs` varchar(255) DEFAULT NULL,
  `cSearchTarife` varchar(255) DEFAULT NULL,
  `dSearchStart` datetime DEFAULT NULL,
  `nHostingRDP` smallint(5) unsigned DEFAULT '0',
  `dHostingRDPStart` datetime DEFAULT NULL,
  `nHostingSQL` smallint(5) unsigned DEFAULT '0',
  `dHostingSQLStart` datetime DEFAULT NULL,
  `nHostingShop` smallint(5) unsigned DEFAULT '0',
  `cHostingShopURLs` text,
  `dHostingShopStart` datetime DEFAULT NULL,
  `nHostingCloud` smallint(5) unsigned DEFAULT '0',
  `cHostingCloudTarif` varchar(255) DEFAULT NULL,
  `dHostingCloudStart` datetime DEFAULT NULL,
  `nShopLizenzenCFE` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenHOST` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenSTD` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenPRO` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenENT` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenDEV` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenTEST` smallint(5) unsigned DEFAULT '0',
  `cShopLizenzenURLs` text,
  `dShopLizenzenStart` datetime DEFAULT NULL,
  `nEXSKaeufeKostenfrei` smallint(5) unsigned DEFAULT '0',
  `nEXSKaeufeKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `fEXSKaeufe` float(10,2) DEFAULT '0.00',
  `dEXSKaeufeStart` datetime DEFAULT NULL,
  `nDirektleistung` smallint(5) unsigned DEFAULT '0',
  `fDirektleistung` float(10,2) DEFAULT '0.00',
  `nWMS` smallint(5) unsigned DEFAULT '0',
  `dWMSStart` datetime DEFAULT NULL,
  `nWMSMDE` smallint(5) unsigned DEFAULT '0',
  `dWMSMDEStart` datetime DEFAULT NULL,
  `nWMSRollendeKommi` smallint(5) unsigned DEFAULT '0',
  `dWMSRollendeKommiStart` datetime DEFAULT NULL,
  `nWMSVersandboxen` smallint(5) unsigned DEFAULT '0',
  `dWMSVersandboxenStart` datetime DEFAULT NULL,
  `nWMSMHD` smallint(5) unsigned DEFAULT '0',
  `dWMSMHDStart` datetime DEFAULT NULL,
  `nWMSMobilerPacktisch` smallint(5) unsigned DEFAULT '0',
  `dWMSMobilerPacktischStart` datetime DEFAULT NULL,
  `nWMSIdentischeAuftraege` smallint(5) unsigned DEFAULT '0',
  `dWMSIdentischeAuftraegeStart` datetime DEFAULT NULL,
  `nWMSWaagen` smallint(5) unsigned DEFAULT '0',
  `dWMSWaagenStart` datetime DEFAULT NULL,
  `nPacktisch` smallint(5) unsigned DEFAULT '0',
  `dPacktischStart` datetime DEFAULT NULL,
  `nMultishop` smallint(5) unsigned DEFAULT '0',
  `dMultishopStart` datetime DEFAULT NULL,
  `nZahlungsmodul` smallint(5) unsigned DEFAULT '0',
  `dZahlungsmodulStart` datetime DEFAULT NULL,
  `nShippingLabels` smallint(5) unsigned DEFAULT '0',
  `dShippingLabelsStart` datetime DEFAULT NULL,
  `nServiceDesk` smallint(5) unsigned DEFAULT '0',
  `dServiceDeskStart` datetime DEFAULT NULL,
  `nConnectorKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `cConnectorKostenpflichtigTypen` varchar(255) DEFAULT NULL,
  `cConnectorKostenpflichtigURLs` varchar(255) DEFAULT NULL,
  `dConnectorKostenpflichtigStart` datetime DEFAULT NULL,
  `nConnectorKostenlos` smallint(5) unsigned DEFAULT '0',
  `cConnectorKostenlosTypen` varchar(255) DEFAULT NULL,
  `cConnectorKostenlosURLs` varchar(255) DEFAULT NULL,
  `dConnectorKostenlosStart` datetime DEFAULT NULL,
  `nTeilmengen` smallint(5) unsigned DEFAULT '0',
  `dTeilmengenStart` datetime DEFAULT NULL,
  `nPOS` smallint(5) unsigned DEFAULT '0',
  `cPOSFilialen` varchar(255) DEFAULT NULL,
  `dPOSStart` datetime DEFAULT NULL,
  `nPOSWebmanager` smallint(5) unsigned DEFAULT '0',
  `dPOSWebmanagerStart` datetime DEFAULT NULL,
  `nPOSInventar` smallint(5) unsigned DEFAULT '0',
  `dPOSInventarStart` datetime DEFAULT NULL,
  `nPOSBon` smallint(5) unsigned DEFAULT '0',
  `dPOSBonStart` datetime DEFAULT NULL,
  `nVouchers` smallint(5) unsigned DEFAULT '0',
  `dVouchersStart` datetime DEFAULT NULL,
  `nBI` smallint(5) unsigned DEFAULT '0',
  `dBIStart` datetime DEFAULT NULL,
  `nFFN` smallint(5) unsigned DEFAULT '0',
  `cFFNRollen` varchar(255) DEFAULT NULL,
  `dFFNStart` datetime DEFAULT NULL,
  `nPAP` smallint(5) unsigned DEFAULT '0',
  `dPAPStart` datetime DEFAULT NULL,
  `nPAPWorkbench` smallint(5) unsigned DEFAULT '0',
  `dPAPWorkbenchStart` datetime DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountstatsprodukte_history
# ------------------------------------------------------------

CREATE TABLE `taccountstatsprodukte_history` (
  `kAccount` int(10) unsigned DEFAULT NULL,
  `cEazyauctionTarif` varchar(50) DEFAULT NULL,
  `cSupportTarif` varchar(20) DEFAULT NULL,
  `cTrackAndTraceTarif` varchar(20) DEFAULT NULL,
  `nSearchTarife` smallint(5) unsigned DEFAULT '0',
  `nHostingRDP` smallint(5) unsigned DEFAULT '0',
  `nHostingSQL` smallint(5) unsigned DEFAULT '0',
  `nHostingShop` smallint(5) unsigned DEFAULT '0',
  `nHostingCloud` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenCFE` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenHOST` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenSTD` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenPRO` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenENT` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenDEV` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenTEST` smallint(5) unsigned DEFAULT '0',
  `nEXSKaeufeKostenfrei` smallint(5) unsigned DEFAULT '0',
  `nEXSKaeufeKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `nDirektleistung` smallint(5) unsigned DEFAULT '0',
  `nWMS` smallint(5) unsigned DEFAULT '0',
  `nWMSMDE` smallint(5) unsigned DEFAULT '0',
  `nWMSRollendeKommi` smallint(5) unsigned DEFAULT '0',
  `nWMSVersandboxen` smallint(5) unsigned DEFAULT '0',
  `nWMSMHD` smallint(5) unsigned DEFAULT '0',
  `nWMSMobilerPacktisch` smallint(5) unsigned DEFAULT '0',
  `nWMSIdentischeAuftraege` smallint(5) unsigned DEFAULT '0',
  `nWMSWaagen` smallint(5) unsigned DEFAULT '0',
  `nPacktisch` smallint(5) unsigned DEFAULT '0',
  `nMultishop` smallint(5) unsigned DEFAULT '0',
  `nZahlungsmodul` smallint(5) unsigned DEFAULT '0',
  `nShippingLabels` smallint(5) unsigned DEFAULT '0',
  `nServiceDesk` smallint(5) unsigned DEFAULT '0',
  `nConnectorKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `nConnectorKostenlos` smallint(5) unsigned DEFAULT '0',
  `nTeilmengen` smallint(5) unsigned DEFAULT '0',
  `nPOS` smallint(5) unsigned DEFAULT '0',
  `cPOSFilialen` varchar(255) DEFAULT NULL,
  `nPOSWebmanager` smallint(5) unsigned DEFAULT '0',
  `nPOSInventar` smallint(5) unsigned DEFAULT '0',
  `nPOSBon` smallint(5) unsigned DEFAULT '0',
  `nVouchers` smallint(5) unsigned DEFAULT '0',
  `nBI` smallint(5) unsigned DEFAULT '0',
  `nFFN` smallint(5) unsigned DEFAULT '0',
  `cFFNRollen` varchar(255) DEFAULT NULL,
  `nPAP` smallint(5) unsigned DEFAULT '0',
  `nPAPWorkbench` smallint(5) unsigned DEFAULT '0',
  `dAktualisiert` datetime DEFAULT NULL,
  KEY `taccountstatsprodukte_history_kaccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountstatsprodukte_log
# ------------------------------------------------------------

CREATE TABLE `taccountstatsprodukte_log` (
  `kAccount` int(10) unsigned DEFAULT NULL,
  `cText` varchar(255) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountstatsprodukte_tmp
# ------------------------------------------------------------

CREATE TABLE `taccountstatsprodukte_tmp` (
  `kAccount` int(10) unsigned NOT NULL,
  `cEazyauctionTarif` varchar(50) DEFAULT NULL,
  `dEazyauctionStart` datetime DEFAULT NULL,
  `cSupportTarif` varchar(20) DEFAULT NULL,
  `dSupportStart` datetime DEFAULT NULL,
  `cTrackAndTraceTarif` varchar(20) DEFAULT NULL,
  `dTrackAndTraceStart` datetime DEFAULT NULL,
  `nSearchTarife` smallint(5) unsigned DEFAULT '0',
  `cSearchURLs` varchar(255) DEFAULT NULL,
  `cSearchTarife` varchar(255) DEFAULT NULL,
  `dSearchStart` datetime DEFAULT NULL,
  `nHostingRDP` smallint(5) unsigned DEFAULT '0',
  `dHostingRDPStart` datetime DEFAULT NULL,
  `nHostingSQL` smallint(5) unsigned DEFAULT '0',
  `dHostingSQLStart` datetime DEFAULT NULL,
  `nHostingShop` smallint(5) unsigned DEFAULT '0',
  `cHostingShopURLs` text,
  `dHostingShopStart` datetime DEFAULT NULL,
  `nHostingCloud` smallint(5) unsigned DEFAULT '0',
  `cHostingCloudTarif` varchar(255) DEFAULT NULL,
  `dHostingCloudStart` datetime DEFAULT NULL,
  `nShopLizenzenCFE` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenHOST` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenSTD` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenPRO` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenENT` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenDEV` smallint(5) unsigned DEFAULT '0',
  `nShopLizenzenTEST` smallint(5) unsigned DEFAULT '0',
  `cShopLizenzenURLs` text,
  `dShopLizenzenStart` datetime DEFAULT NULL,
  `nEXSKaeufeKostenfrei` smallint(5) unsigned DEFAULT '0',
  `nEXSKaeufeKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `fEXSKaeufe` float(10,2) DEFAULT '0.00',
  `dEXSKaeufeStart` datetime DEFAULT NULL,
  `nDirektleistung` smallint(5) unsigned DEFAULT '0',
  `fDirektleistung` float(10,2) DEFAULT '0.00',
  `nWMS` smallint(5) unsigned DEFAULT '0',
  `dWMSStart` datetime DEFAULT NULL,
  `nWMSMDE` smallint(5) unsigned DEFAULT '0',
  `dWMSMDEStart` datetime DEFAULT NULL,
  `nWMSRollendeKommi` smallint(5) unsigned DEFAULT '0',
  `dWMSRollendeKommiStart` datetime DEFAULT NULL,
  `nWMSVersandboxen` smallint(5) unsigned DEFAULT '0',
  `dWMSVersandboxenStart` datetime DEFAULT NULL,
  `nWMSMHD` smallint(5) unsigned DEFAULT '0',
  `dWMSMHDStart` datetime DEFAULT NULL,
  `nWMSMobilerPacktisch` smallint(5) unsigned DEFAULT '0',
  `dWMSMobilerPacktischStart` datetime DEFAULT NULL,
  `nWMSIdentischeAuftraege` smallint(5) unsigned DEFAULT '0',
  `dWMSIdentischeAuftraegeStart` datetime DEFAULT NULL,
  `nWMSWaagen` smallint(5) unsigned DEFAULT '0',
  `dWMSWaagenStart` datetime DEFAULT NULL,
  `nPacktisch` smallint(5) unsigned DEFAULT '0',
  `dPacktischStart` datetime DEFAULT NULL,
  `nMultishop` smallint(5) unsigned DEFAULT '0',
  `dMultishopStart` datetime DEFAULT NULL,
  `nZahlungsmodul` smallint(5) unsigned DEFAULT '0',
  `dZahlungsmodulStart` datetime DEFAULT NULL,
  `nShippingLabels` smallint(5) unsigned DEFAULT '0',
  `dShippingLabelsStart` datetime DEFAULT NULL,
  `nServiceDesk` smallint(5) unsigned DEFAULT '0',
  `dServiceDeskStart` datetime DEFAULT NULL,
  `nConnectorKostenpflichtig` smallint(5) unsigned DEFAULT '0',
  `cConnectorKostenpflichtigTypen` varchar(255) DEFAULT NULL,
  `cConnectorKostenpflichtigURLs` varchar(255) DEFAULT NULL,
  `dConnectorKostenpflichtigStart` datetime DEFAULT NULL,
  `nConnectorKostenlos` smallint(5) unsigned DEFAULT '0',
  `cConnectorKostenlosTypen` varchar(255) DEFAULT NULL,
  `cConnectorKostenlosURLs` varchar(255) DEFAULT NULL,
  `dConnectorKostenlosStart` datetime DEFAULT NULL,
  `nTeilmengen` smallint(5) unsigned DEFAULT '0',
  `dTeilmengenStart` datetime DEFAULT NULL,
  `nPOS` smallint(5) unsigned DEFAULT '0',
  `cPOSFilialen` varchar(255) DEFAULT NULL,
  `dPOSStart` datetime DEFAULT NULL,
  `nPOSWebmanager` smallint(5) unsigned DEFAULT '0',
  `dPOSWebmanagerStart` datetime DEFAULT NULL,
  `nPOSInventar` smallint(5) unsigned DEFAULT '0',
  `dPOSInventarStart` datetime DEFAULT NULL,
  `nPOSBon` smallint(5) unsigned DEFAULT '0',
  `dPOSBonStart` datetime DEFAULT NULL,
  `nVouchers` smallint(5) unsigned DEFAULT '0',
  `dVouchersStart` datetime DEFAULT NULL,
  `nBI` smallint(5) unsigned DEFAULT '0',
  `dBIStart` datetime DEFAULT NULL,
  `nFFN` smallint(5) unsigned DEFAULT '0',
  `cFFNRollen` varchar(255) DEFAULT NULL,
  `dFFNStart` datetime DEFAULT NULL,
  `nPAP` smallint(5) unsigned DEFAULT '0',
  `dPAPStart` datetime DEFAULT NULL,
  `nPAPWorkbench` smallint(5) unsigned DEFAULT '0',
  `dPAPWorkbenchStart` datetime DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountumgebung
# ------------------------------------------------------------

CREATE TABLE `taccountumgebung` (
  `kAccountumgebung` tinyint(3) unsigned DEFAULT NULL,
  `cName` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump taccountverwaltung
# ------------------------------------------------------------

CREATE TABLE `taccountverwaltung` (
  `kAccountverwaltung` tinyint(3) unsigned DEFAULT NULL,
  `cName` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tactionlog
# ------------------------------------------------------------

CREATE TABLE `tactionlog` (
  `kActionlog` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `cMessage` longtext NOT NULL,
  `cFile` varchar(255) NOT NULL,
  `cParam` longtext NOT NULL,
  `cResponse` longtext NOT NULL,
  `dEingetragen` datetime NOT NULL,
  PRIMARY KEY (`kActionlog`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tadminbenutzergruppen
# ------------------------------------------------------------

CREATE TABLE `tadminbenutzergruppen` (
  `kAdminBenutzergruppe` int(11) NOT NULL AUTO_INCREMENT,
  `cGruppenname` varchar(255) NOT NULL,
  PRIMARY KEY (`kAdminBenutzergruppe`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tadminbenutzergruppenrelation
# ------------------------------------------------------------

CREATE TABLE `tadminbenutzergruppenrelation` (
  `kAdminBenutzergruppe` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tansprechpartner
# ------------------------------------------------------------

CREATE TABLE `tansprechpartner` (
  `kAnsprechpartner` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) unsigned NOT NULL DEFAULT '0',
  `kTechnologiepartner` int(10) NOT NULL DEFAULT '0',
  `kAccount` int(10) NOT NULL DEFAULT '0',
  `cAnrede` varchar(255) NOT NULL,
  `cTitel` varchar(255) DEFAULT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cTel` varchar(255) NOT NULL,
  `cMobil` varchar(255) DEFAULT NULL,
  `cFax` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  `cBild` varchar(255) DEFAULT NULL,
  `cRollen` varchar(255) DEFAULT '[]',
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  `nEmailZeigen` tinyint(3) unsigned DEFAULT '1',
  `nNewsletter1` tinyint(3) unsigned DEFAULT '0',
  `nNewsletter2` tinyint(3) unsigned DEFAULT '0',
  `nNewsletter3` tinyint(3) unsigned DEFAULT '0',
  `nNewsletter4` tinyint(3) unsigned DEFAULT '0',
  `dGeaendert` datetime DEFAULT NULL,
  `nDsgvo` tinyint(3) NOT NULL,
  PRIMARY KEY (`kAnsprechpartner`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `kTechnologiepartner` (`kTechnologiepartner`),
  KEY `kAccount` (`kAccount`),
  KEY `kServicepartner` (`kServicepartner`),
  KEY `tsp_kAccount_cEmail_index` (`kAccount`,`cEmail`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tanzahlmitarbeiter
# ------------------------------------------------------------

CREATE TABLE `tanzahlmitarbeiter` (
  `kAnzahlMitarbeiter` tinyint(4) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '0',
  `nSort` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kAnzahlMitarbeiter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tbackupstatus
# ------------------------------------------------------------

CREATE TABLE `tbackupstatus` (
  `kServer` int(11) NOT NULL,
  `kBackupserver` int(11) NOT NULL,
  `cPfad` varchar(250) NOT NULL,
  `cFilename` varchar(250) NOT NULL,
  `nSize` bigint(20) NOT NULL,
  `bAktuell` int(11) NOT NULL,
  `dFiletime` bigint(20) NOT NULL,
  `dEingetragen` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tbankpruefung
# ------------------------------------------------------------

CREATE TABLE `tbankpruefung` (
  `kPruefung` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `nErgebnis` int(11) DEFAULT NULL,
  `cHerkunft` varchar(255) DEFAULT NULL,
  `dPruefung` datetime DEFAULT NULL,
  `cBankinstitutALT` varchar(255) DEFAULT NULL,
  `cBankinstitutNEU` varchar(255) DEFAULT NULL,
  `nKontoNrALT` varchar(255) DEFAULT NULL,
  `nKontoNrNEU` varchar(255) DEFAULT NULL,
  `nBLZALT` bigint(20) DEFAULT NULL,
  `nBLZNEU` bigint(20) DEFAULT NULL,
  `cKontoinhaberALT` varchar(255) DEFAULT NULL,
  `cKontoinhaberNEU` varchar(255) DEFAULT NULL,
  `cIBANALT` varchar(255) DEFAULT NULL,
  `cIBANNEU` varchar(255) DEFAULT NULL,
  `cBICALT` varchar(255) DEFAULT NULL,
  `cBICNEU` varchar(255) DEFAULT NULL,
  `cBanknameALT` varchar(255) DEFAULT NULL,
  `cBanknameNEU` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kPruefung`),
  KEY `kAccount` (`kAccount`,`dPruefung`),
  KEY `cHerkunft` (`cHerkunft`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tblowfish
# ------------------------------------------------------------

CREATE TABLE `tblowfish` (
  `cBlowfishKey` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`cBlowfishKey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tbranche
# ------------------------------------------------------------

CREATE TABLE `tbranche` (
  `kBranche` tinyint(4) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `nSort` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`kBranche`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tbrocken
# ------------------------------------------------------------

CREATE TABLE `tbrocken` (
  `kBrocken` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kShop` int(10) unsigned NOT NULL,
  `cBrocken` text NOT NULL,
  `nNeuErstellen` tinyint(1) DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kBrocken`),
  KEY `kShop` (`kShop`,`nNeuErstellen`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tbrockenhistoryfailure
# ------------------------------------------------------------

CREATE TABLE `tbrockenhistoryfailure` (
  `kBrockenHistoryFailure` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cIP` varchar(255) NOT NULL,
  `cError` varchar(255) NOT NULL,
  `cPost` text NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kBrockenHistoryFailure`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tbrockenhistorysuccess
# ------------------------------------------------------------

CREATE TABLE `tbrockenhistorysuccess` (
  `kBrockenHistorySuccess` int(11) NOT NULL AUTO_INCREMENT,
  `kShop` int(10) unsigned NOT NULL,
  `cIP` varchar(255) NOT NULL,
  `cPost` text NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kBrockenHistorySuccess`),
  KEY `kShop` (`kShop`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tconnectortarifbuchungen
# ------------------------------------------------------------

CREATE TABLE `tconnectortarifbuchungen` (
  `kBuchung` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kLicense` int(11) NOT NULL,
  `kTarif` int(11) NOT NULL,
  `bActive` tinyint(4) NOT NULL DEFAULT '1',
  `fKosten` float DEFAULT '0',
  `dGebuchtAm` datetime NOT NULL,
  `dGueltigAb` datetime DEFAULT NULL,
  `dGekuendigtZum` datetime DEFAULT NULL,
  `cGekuendigtDurch` char(120) DEFAULT NULL,
  `kBuchungNeu` bigint(11) DEFAULT NULL,
  PRIMARY KEY (`kBuchung`),
  KEY `kAccount` (`kAccount`),
  KEY `kLicense` (`kLicense`),
  KEY `kTarif` (`kTarif`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tconnectortarife
# ------------------------------------------------------------

CREATE TABLE `tconnectortarife` (
  `kTarif` int(11) NOT NULL AUTO_INCREMENT,
  `kConnectorType` int(11) NOT NULL,
  `cTarifname` varchar(250) DEFAULT NULL,
  `nBuchbar` int(11) DEFAULT NULL,
  `nSort` int(11) NOT NULL,
  `fKostenMonat` float(10,2) DEFAULT NULL,
  `fKostenTransaktionen` float(10,2) NOT NULL,
  `nTransaktionenInkl` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kTarif`),
  KEY `kConnectorType` (`kConnectorType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tconnectortarifhistory
# ------------------------------------------------------------

CREATE TABLE `tconnectortarifhistory` (
  `kConnectortarifhistory` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kLicense` int(11) NOT NULL,
  `cSource` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Herkunft des Datensatzes - Kunde oder JTL',
  `cAction` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `cTarifdataOld` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `cTarifdataNew` longtext COLLATE utf8mb4_unicode_ci,
  `dCreated_at` datetime NOT NULL,
  `dUpdated_at` datetime NOT NULL,
  PRIMARY KEY (`kConnectortarifhistory`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump tcrawler
# ------------------------------------------------------------

CREATE TABLE `tcrawler` (
  `alexarank` int(11) NOT NULL,
  `url` varchar(255) NOT NULL,
  `cms` varchar(255) NOT NULL,
  `certainty` varchar(255) NOT NULL,
  `tld` varchar(255) NOT NULL,
  `geocc2` varchar(255) NOT NULL,
  `cAdditional` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tcustomercare
# ------------------------------------------------------------

CREATE TABLE `tcustomercare` (
  `kCustomercare` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kKey` int(11) NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cHinweis` varchar(255) NOT NULL,
  `bSolved` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kCustomercare`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tcustomercarelog
# ------------------------------------------------------------

CREATE TABLE `tcustomercarelog` (
  `kCustomercarelog` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `cServiceName` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `dGesendet` datetime NOT NULL,
  PRIMARY KEY (`kCustomercarelog`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tdatenabfrage
# ------------------------------------------------------------

CREATE TABLE `tdatenabfrage` (
  `kDatenabfrage` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) DEFAULT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `cArt` varchar(255) DEFAULT NULL,
  `cKey` varchar(255) DEFAULT NULL,
  `kKey` int(11) DEFAULT NULL,
  `cGrund` varchar(255) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kDatenabfrage`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdatenuebernahme
# ------------------------------------------------------------

CREATE TABLE `tdatenuebernahme` (
  `kDatenuebernahme` int(11) NOT NULL AUTO_INCREMENT,
  `kErsteller` int(11) NOT NULL,
  `kKunde` int(11) NOT NULL,
  `cUebernahmeSystem` enum('Shop','WaWi') DEFAULT NULL,
  `cAltesSystem` varchar(255) NOT NULL,
  `cSqlVersion` varchar(255) NOT NULL,
  `cBetriebssystem` varchar(255) NOT NULL,
  `cKundennr` varchar(255) NOT NULL,
  `cKundename` varchar(255) NOT NULL,
  `cKundeemail` varchar(255) NOT NULL,
  `cKundetelefon` varchar(255) NOT NULL,
  `cBeratungsprotokoll` longtext NOT NULL,
  `cZeitaufwandGeschaetzt` varchar(255) NOT NULL,
  `cZusaetzlicheStunden` varchar(255) NOT NULL,
  `cProbleme` longtext NOT NULL,
  `bDatenVernichtet` enum('0','1') NOT NULL DEFAULT '0',
  `dDatenVernichted` datetime NOT NULL,
  `kDatenvernichtetDurch` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dAktualisiert` datetime NOT NULL,
  PRIMARY KEY (`kDatenuebernahme`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tdatenuebernahmevorgang
# ------------------------------------------------------------

CREATE TABLE `tdatenuebernahmevorgang` (
  `kDatenuebernahmevorgang` int(11) NOT NULL AUTO_INCREMENT,
  `kDatenuebernahme` int(11) NOT NULL,
  `kBearbeiter` int(11) NOT NULL,
  `cVorgang` text NOT NULL,
  `cZeitaufwand` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDatenuebernahmevorgang`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tdebugreport
# ------------------------------------------------------------

CREATE TABLE `tdebugreport` (
  `kDebugReport` int(11) NOT NULL AUTO_INCREMENT,
  `cLog` text NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cValue` varchar(255) DEFAULT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kDebugReport`),
  KEY `cKey` (`cKey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tdevice
# ------------------------------------------------------------

CREATE TABLE `tdevice` (
  `kDevice` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `nType` enum('POS') NOT NULL,
  `cId` varchar(36) NOT NULL,
  `dUpdated` datetime NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kDevice`),
  KEY `tdevice_kaccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdevicereset
# ------------------------------------------------------------

CREATE TABLE `tdevicereset` (
  `kDeviceReset` int(11) NOT NULL AUTO_INCREMENT,
  `kDevice` int(11) NOT NULL,
  `cCode` varchar(32) NOT NULL,
  `dReceived` datetime DEFAULT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kDeviceReset`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdirektleistung
# ------------------------------------------------------------

CREATE TABLE `tdirektleistung` (
  `kDirektleistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kDirektleistungTyp` int(10) unsigned DEFAULT NULL,
  `cName` varchar(200) DEFAULT NULL,
  `kVorlageSystemmail` int(10) unsigned DEFAULT '0',
  `fBetragNetto` double DEFAULT NULL,
  `nSichtbar` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`kDirektleistung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdirektleistungtyp
# ------------------------------------------------------------

CREATE TABLE `tdirektleistungtyp` (
  `kDirektleistungTyp` int(10) unsigned NOT NULL,
  `cLeistungstyp` varchar(100) DEFAULT NULL,
  `nSichtbarEmpfehlungsliste` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nSort` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`kDirektleistungTyp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdomainorder
# ------------------------------------------------------------

CREATE TABLE `tdomainorder` (
  `kOrder` int(11) NOT NULL AUTO_INCREMENT,
  `cDomain` varchar(255) NOT NULL,
  `kHostingPos` int(11) NOT NULL,
  `nStatus` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kOrder`),
  KEY `cDomain` (`cDomain`),
  KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdomainorderlog
# ------------------------------------------------------------

CREATE TABLE `tdomainorderlog` (
  `kLog` int(11) NOT NULL AUTO_INCREMENT,
  `kOrder` int(11) NOT NULL,
  `cStep` varchar(255) NOT NULL,
  `cRequest` text,
  `cResponse` text,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kLog`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tdownloadprodukt
# ------------------------------------------------------------

CREATE TABLE `tdownloadprodukt` (
  `kDownloadProdukt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufProdukt` int(11) NOT NULL DEFAULT '0',
  `cName` varchar(255) NOT NULL,
  `cBild` varchar(255) NOT NULL,
  `cBeschreibung` text,
  `nSort` int(10) unsigned NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nGruppe` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDownloadProdukt`),
  KEY `nAktiv` (`nAktiv`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tdownloadproduktversion
# ------------------------------------------------------------

CREATE TABLE `tdownloadproduktversion` (
  `kDownloadProduktVersion` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kDownloadProdukt` int(10) unsigned NOT NULL,
  `cChangelog` text NOT NULL,
  `cHinweisHosting` text,
  `nBuild` tinyint(4) DEFAULT NULL,
  `eChannel` enum('Stable','Community Free','RC','Archiv') NOT NULL DEFAULT 'Stable',
  `cDatei` varchar(255) NOT NULL,
  `cVersion` varchar(255) NOT NULL,
  `cVersionSemver` varchar(255) DEFAULT NULL,
  `cURL` varchar(255) NOT NULL DEFAULT '',
  `nType` int(11) NOT NULL DEFAULT '0',
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  `nDL` int(10) unsigned DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDownloadProduktVersion`),
  KEY `nAktiv` (`nAktiv`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tduk
# ------------------------------------------------------------

CREATE TABLE `tduk` (
  `kDuk` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cText` text CHARACTER SET utf8 NOT NULL,
  `dUpdated` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kDuk`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump teabenutzername
# ------------------------------------------------------------

CREATE TABLE `teabenutzername` (
  `kEABenutzername` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `kEbayKundenAccount` int(11) DEFAULT NULL,
  `kUserId` int(11) DEFAULT NULL,
  `cMerchantId` varchar(255) DEFAULT NULL,
  `cBenutzername` varchar(255) DEFAULT NULL,
  `eTyp` enum('eBay','Amazon') DEFAULT NULL,
  `dErstellt` date DEFAULT NULL,
  `dErfasst` datetime DEFAULT NULL,
  PRIMARY KEY (`kEABenutzername`),
  KEY `kAccount` (`kAccount`),
  KEY `kEbayBenutzer` (`kEbayKundenAccount`),
  KEY `cBenutzername` (`cBenutzername`),
  KEY `eTyp` (`eTyp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump teakuendigungen_history
# ------------------------------------------------------------

CREATE TABLE `teakuendigungen_history` (
  `kEaKuendigungHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `nKuendigungRB` int(11) NOT NULL,
  `nKuendigungSofort` int(11) NOT NULL,
  `nKuendigungAufheben` int(11) NOT NULL,
  `dKuendigungZum` date NOT NULL,
  `dEingetragen` datetime NOT NULL,
  PRIMARY KEY (`kEaKuendigungHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump teasync_failed
# ------------------------------------------------------------

CREATE TABLE `teasync_failed` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payload` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tEAtarife
# ------------------------------------------------------------

CREATE TABLE `tEAtarife` (
  `kEAtarif` int(11) NOT NULL AUTO_INCREMENT,
  `cTarifname` varchar(250) DEFAULT NULL,
  `nBuchbar` int(11) DEFAULT NULL,
  `nAmazon` int(11) NOT NULL,
  `nSort` int(11) NOT NULL,
  `fKostenMonat` float(10,2) DEFAULT NULL,
  `fKostenTransaktion` float(10,2) NOT NULL,
  `nTransaktionenInkl` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kEAtarif`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump teatarifwechsel_history
# ------------------------------------------------------------

CREATE TABLE `teatarifwechsel_history` (
  `kEaTarifwwechselHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminLogin` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `cTarifNeu` varchar(250) NOT NULL,
  `cTarifAlt` varchar(250) NOT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  `dWechselZum` datetime NOT NULL,
  `bGewechselt` tinyint(4) NOT NULL,
  PRIMARY KEY (`kEaTarifwwechselHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tempfehlungsliste
# ------------------------------------------------------------

CREATE TABLE `tempfehlungsliste` (
  `kEmpfehlungsliste` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccountWerbende` int(10) unsigned NOT NULL,
  `kAnsprechpartner` int(10) unsigned NOT NULL DEFAULT '0',
  `kPlatzierung` int(10) unsigned DEFAULT '0',
  `cIdentifier` varchar(30) DEFAULT NULL,
  `cBundleAngebotsnummer` varchar(50) DEFAULT NULL,
  `cBundleReferenzlink` varchar(255) DEFAULT NULL,
  `cAnmerkung` text,
  `cInternerName` varchar(100) DEFAULT NULL,
  `cBitrixLeadId` varchar(255) DEFAULT NULL,
  `nLinkAufrufe` int(11) NOT NULL DEFAULT '0',
  `nBuchungenNeukunde` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nBuchungenBestandskunde` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nPositionenNichtAbhakbar` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nGlobalerRabatt` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nGlobalerRabattMonate` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nAnzahlBearbeitungen` tinyint(3) unsigned DEFAULT '0',
  `nBundle` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `dGueltigBis` datetime NOT NULL,
  `dGebucht` datetime DEFAULT NULL,
  `dBearbeitet` datetime DEFAULT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kEmpfehlungsliste`),
  KEY `tempfehlungsliste_cIdentifier_index` (`cIdentifier`),
  KEY `tempfehlungsliste_dErstellt_index` (`dErstellt`),
  KEY `tempfehlungsliste_dGebucht_index` (`dGebucht`),
  KEY `tempfehlungsliste_kAccountWerbende_index` (`kAccountWerbende`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistebuchung
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistebuchung` (
  `kEmpfehlungslisteBuchung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kEmpfehlungslisteBuchungParent` int(10) unsigned DEFAULT NULL,
  `kEmpfehlungslistePos` int(10) unsigned DEFAULT NULL,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kAccountWerbende` int(10) unsigned DEFAULT NULL,
  `kLic` int(10) unsigned DEFAULT NULL,
  `kLicense` int(10) unsigned DEFAULT NULL,
  `kHostingPos` int(10) unsigned DEFAULT NULL,
  `kSearch` int(10) unsigned DEFAULT NULL,
  `k3rdPartyBuchung` int(10) unsigned DEFAULT NULL,
  `cProdukt` varchar(100) DEFAULT NULL,
  `nProvisionsberechtigt` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `cProvisionsunberechtigtGrund` varchar(255) DEFAULT NULL,
  `dProvisionsberechtigungErloschen` datetime DEFAULT NULL,
  `cProvisionsberechtigungErloschenGrund` varchar(255) DEFAULT NULL,
  `nKundentyp` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kEmpfehlungslisteBuchung`),
  KEY `tempfehlungslistebuchung_kAccountWerbende_index` (`kAccountWerbende`),
  KEY `tempfehlungslistebuchung_kAccount_index` (`kAccount`),
  KEY `tempfehlungslistebuchung_kEmpfehlungslistePos_index` (`kEmpfehlungslistePos`),
  KEY `tempfehlungslistebuchung_kHostingPos_index` (`kHostingPos`),
  KEY `tempfehlungslistebuchung_kLic_index` (`kLic`),
  KEY `tempfehlungslistebuchung_kLicense_index` (`kLicense`),
  KEY `tempfehlungslistebuchung_kSearch_index` (`kSearch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistebuchungsfehler
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistebuchungsfehler` (
  `kEmpfehlungslistePos` int(10) unsigned NOT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `cFehlercode` varchar(255) DEFAULT NULL,
  `cFehler` text,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kEmpfehlungslistePos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistekanal
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistekanal` (
  `kEmpfehlungslisteKanal` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `nSort` smallint(5) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kEmpfehlungslisteKanal`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslisteleistung
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslisteleistung` (
  `kEmpfehlungslisteLeistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cLeistung` varchar(255) DEFAULT NULL,
  `cProdukt` varchar(100) DEFAULT NULL,
  `cTarif` varchar(50) DEFAULT NULL,
  `cLeistungIdentifier` varchar(100) DEFAULT NULL,
  `cLeistungGroupIdentifier` varchar(100) DEFAULT NULL,
  `fPreisMonatlich` float(10,2) DEFAULT NULL,
  `fPreisEinmalig` float(10,2) DEFAULT NULL,
  `fPreisUeberTarif1` float(10,2) DEFAULT NULL,
  `fPreisUeberTarif2` float(10,2) DEFAULT NULL,
  `cForeignKeyReferenz` varchar(100) DEFAULT NULL,
  `kForeignKeyWert` int(10) unsigned DEFAULT NULL,
  `nVolumenlizenz` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nKostenfreieLizenzen` tinyint(4) NOT NULL DEFAULT '0',
  `cProduktfamilie` varchar(100) DEFAULT NULL,
  `cMoreInfoLink` varchar(255) DEFAULT NULL,
  `cTooltip` text,
  `nRabbatierbar` tinyint(3) unsigned DEFAULT '1',
  `nSEPANotwendig` tinyint(3) unsigned DEFAULT '1',
  `kVorlageSystemmail` int(11) DEFAULT '0',
  `nSort` int(10) unsigned DEFAULT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kEmpfehlungslisteLeistung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistenichtbuchung
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistenichtbuchung` (
  `kEmpfehlungslistePos` int(10) unsigned NOT NULL,
  `nAktivNichtGebucht` tinyint(3) unsigned DEFAULT NULL,
  `nPositionBereitsGebucht` tinyint(3) unsigned DEFAULT NULL,
  `cBereitsGebuchtDetails` varchar(255) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kEmpfehlungslistePos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistepartneroptin
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistepartneroptin` (
  `kAccount` int(10) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  UNIQUE KEY `tempfehlungslistepartneroptin_kAccount_uindex` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistepos
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistepos` (
  `kEmpfehlungslistePos` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kEmpfehlungsliste` int(10) unsigned NOT NULL,
  `kEmpfehlungslistePosParent` int(10) unsigned NOT NULL,
  `kEmpfehlungslisteLeistung` int(10) unsigned NOT NULL,
  `nAnzahl` int(10) unsigned DEFAULT NULL,
  `nAnzahlVeraenderbar` tinyint(3) unsigned DEFAULT '0',
  `cDetailsJSON` text,
  `nErfolgreichGebucht` tinyint(4) NOT NULL DEFAULT '0',
  `nBuchungsfehler` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kEmpfehlungslistePos`),
  KEY `tempfehlungslistepos_kEmpfehlungsliste_index` (`kEmpfehlungsliste`),
  KEY `tempfehlungslistepos_kEmpfehlungslisteLeistung_index` (`kEmpfehlungslisteLeistung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tempfehlungslistezugang
# ------------------------------------------------------------

CREATE TABLE `tempfehlungslistezugang` (
  `kAccount` int(10) unsigned NOT NULL,
  `cTyp` varchar(50) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump terfahren
# ------------------------------------------------------------

CREATE TABLE `terfahren` (
  `kErfahren` int(11) NOT NULL AUTO_INCREMENT,
  `kQuelle` int(11) NOT NULL DEFAULT '0',
  `kAccount` int(11) NOT NULL DEFAULT '0',
  `cBeschreibung` varchar(255) DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kErfahren`),
  UNIQUE KEY `kAccount` (`kAccount`),
  KEY `kQuelle` (`kQuelle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='"Wodurch haben Sie von JTL-Software erfahren?"';



# Tabellen-Dump terfahrenquelle
# ------------------------------------------------------------

CREATE TABLE `terfahrenquelle` (
  `kQuelle` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(50) NOT NULL,
  PRIMARY KEY (`kQuelle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump terweiterterstatus
# ------------------------------------------------------------

CREATE TABLE `terweiterterstatus` (
  `kStatus` int(11) NOT NULL AUTO_INCREMENT,
  `cStatusText` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`kStatus`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump terweiterung
# ------------------------------------------------------------

CREATE TABLE `terweiterung` (
  `kErweiterung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kErweiterungKategorie` int(10) unsigned NOT NULL,
  `kServicepartner` int(10) unsigned NOT NULL DEFAULT '0',
  `kTechnologiepartner` int(10) NOT NULL DEFAULT '0',
  `cName` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cKurzBeschreibung` varchar(255) NOT NULL,
  `cUrl` varchar(255) NOT NULL,
  `cVersion` varchar(10) NOT NULL,
  `cPluginID` varchar(255) NOT NULL,
  `fPreisNetto` double NOT NULL,
  `bHighlight` tinyint(1) NOT NULL DEFAULT '0',
  `bJtlVerkauf` tinyint(1) NOT NULL DEFAULT '0',
  `dAktualisiert` int(10) NOT NULL,
  `dErstellt` int(10) NOT NULL,
  `bDeleted` tinyint(1) NOT NULL DEFAULT '0',
  `bMarktplatz` tinyint(1) DEFAULT '0',
  `cKompVon` varchar(255) DEFAULT NULL,
  `cKompBis` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kErweiterung`),
  KEY `kServicepartner` (`kServicepartner`),
  KEY `kErweiterungKategorie` (`kErweiterungKategorie`),
  KEY `kTechnologiepartner` (`kTechnologiepartner`),
  FULLTEXT KEY `cName` (`cName`,`cBeschreibung`,`cKurzBeschreibung`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump terweiterungbilder
# ------------------------------------------------------------

CREATE TABLE `terweiterungbilder` (
  `kErweiterungbilder` int(10) NOT NULL AUTO_INCREMENT,
  `kErweiterung` int(10) unsigned NOT NULL,
  `cPfad` varchar(255) NOT NULL,
  `bStandard` tinyint(1) NOT NULL,
  PRIMARY KEY (`kErweiterungbilder`),
  KEY `kErweiterung` (`kErweiterung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump terweiterungkategorie
# ------------------------------------------------------------

CREATE TABLE `terweiterungkategorie` (
  `kErweiterungkategorie` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kVaterkategorie` int(10) unsigned NOT NULL DEFAULT '0',
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kErweiterungkategorie`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump terweiterungredirect
# ------------------------------------------------------------

CREATE TABLE `terweiterungredirect` (
  `kErweiterungdownload` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kErweiterung` int(10) unsigned NOT NULL,
  `cIP` varchar(255) NOT NULL,
  `dErstellt` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kErweiterungdownload`),
  KEY `kErweiterung` (`kErweiterung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump terweiterungview
# ------------------------------------------------------------

CREATE TABLE `terweiterungview` (
  `kErweiterungview` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kErweiterung` int(10) unsigned NOT NULL,
  `cIP` varchar(255) NOT NULL,
  `dErstellt` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kErweiterungview`),
  KEY `kErweiterung` (`kErweiterung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tevent
# ------------------------------------------------------------

CREATE TABLE `tevent` (
  `kEvent` int(11) NOT NULL AUTO_INCREMENT,
  `eKategorie` enum('','ROADSHOW') NOT NULL DEFAULT '',
  `cName` varchar(255) DEFAULT NULL,
  `cLogo` varchar(255) DEFAULT NULL,
  `dDatumBeginn` date DEFAULT NULL,
  `dDatumEnde` date DEFAULT NULL,
  `cStrasse` varchar(255) DEFAULT NULL,
  `cOrt` varchar(255) DEFAULT NULL,
  `cOrtName` varchar(255) DEFAULT NULL,
  `cPLZ` varchar(10) DEFAULT NULL,
  `cLand` varchar(255) DEFAULT NULL,
  `cKurzbeschreibung` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  `nTerminBuchen` tinyint(4) DEFAULT '0',
  `nAktiv` tinyint(4) NOT NULL DEFAULT '0',
  `cLink` varchar(255) DEFAULT '0',
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `dErstellt` datetime DEFAULT NULL,
  `dAenderung` datetime DEFAULT NULL,
  PRIMARY KEY (`kEvent`),
  KEY `dDatumBeginn` (`dDatumBeginn`),
  KEY `dDatumEnde` (`dDatumEnde`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tfremdlizenz
# ------------------------------------------------------------

CREATE TABLE `tfremdlizenz` (
  `kFremdlizenz` int(11) NOT NULL AUTO_INCREMENT,
  `kErweiterung` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `cDomain` varchar(100) NOT NULL,
  `cRechnungsnr` varchar(100) NOT NULL,
  `cKommentar` longtext NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kFremdlizenz`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tfulfillmenterror
# ------------------------------------------------------------

CREATE TABLE `tfulfillmenterror` (
  `kError` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `cBody` text,
  `cPost` text,
  `nHTTPCode` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kError`),
  KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tgeschaeftsform
# ------------------------------------------------------------

CREATE TABLE `tgeschaeftsform` (
  `kGeschaeftsform` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kGeschaeftsform`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tguthaben
# ------------------------------------------------------------

CREATE TABLE `tguthaben` (
  `kGuthaben` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `fGuthaben` float(10,2) NOT NULL,
  `cGuthabenGrund` varchar(255) NOT NULL,
  `dGuthabenErstellt` date DEFAULT NULL,
  PRIMARY KEY (`kGuthaben`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tguthabenverrechnet
# ------------------------------------------------------------

CREATE TABLE `tguthabenverrechnet` (
  `kGuthabenVerrechnet` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kRechnung` int(11) NOT NULL,
  `fBetrag` float(10,2) NOT NULL,
  `dGuthabenVerrechnet` date DEFAULT NULL,
  PRIMARY KEY (`kGuthabenVerrechnet`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thilfsmittel
# ------------------------------------------------------------

CREATE TABLE `thilfsmittel` (
  `kHilfsmittel` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kHilfsmittelRubrik` int(10) unsigned DEFAULT NULL,
  `cName` varchar(100) DEFAULT NULL,
  `cErgaenzungName` varchar(50) DEFAULT NULL,
  `cErgaenzung` text,
  `nErgaenzungDownload` tinyint(3) unsigned DEFAULT NULL,
  `cURLName` varchar(50) DEFAULT NULL,
  `cURL` varchar(255) DEFAULT NULL,
  `nURLAktion` tinyint(3) unsigned DEFAULT NULL,
  `cEinverstaendnis` text,
  `cEinverstaendnisHilfetext` text,
  `cDownloadButtonName` varchar(50) NOT NULL DEFAULT 'Download',
  `cDateiPfad` varchar(255) DEFAULT NULL,
  `cUrlDownloadExtern` varchar(255) DEFAULT NULL,
  `dTermin` datetime DEFAULT NULL,
  `dGueltigAb` datetime DEFAULT NULL,
  `dGueltigBis` datetime DEFAULT NULL,
  `nDownloadCounter` int(10) unsigned DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  `cBearbeiter` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`kHilfsmittel`),
  KEY `ix_kHilfsmittelRubrik` (`kHilfsmittelRubrik`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thilfsmittelrubrik
# ------------------------------------------------------------

CREATE TABLE `thilfsmittelrubrik` (
  `kHilfsmittelRubrik` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(75) DEFAULT NULL,
  `cInternerKommentar` varchar(200) DEFAULT NULL,
  `nSort` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`kHilfsmittelRubrik`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thilfsmittelsichtbarkeit
# ------------------------------------------------------------

CREATE TABLE `thilfsmittelsichtbarkeit` (
  `kHilfsmittel` int(10) unsigned DEFAULT NULL,
  `kAccountRolle` int(10) unsigned DEFAULT NULL,
  KEY `ix` (`kHilfsmittel`,`kAccountRolle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thosting
# ------------------------------------------------------------

CREATE TABLE `thosting` (
  `kHosting` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `cKommentar` text,
  `nLastschrift` tinyint(3) unsigned DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `nLocked` tinyint(4) DEFAULT '0',
  `cNotfallMail` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kHosting`),
  KEY `kAccount` (`kAccount`),
  KEY `nAktiv` (`nAktiv`),
  KEY `nLastschrift` (`nLastschrift`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingamazonpayaktion
# ------------------------------------------------------------

CREATE TABLE `thostingamazonpayaktion` (
  `kHostingPos` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingdawandaaktion
# ------------------------------------------------------------

CREATE TABLE `thostingdawandaaktion` (
  `kHostingPos` int(13) NOT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingdomaincheck
# ------------------------------------------------------------

CREATE TABLE `thostingdomaincheck` (
  `kDomaincheck` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `cDomain` varchar(255) NOT NULL,
  `cTLD` varchar(10) NOT NULL,
  `bValid` tinyint(4) NOT NULL,
  `bAvailable` tinyint(4) NOT NULL,
  `cWhoIsXmlResponse` text,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDomaincheck`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingkuendigungdatensicherung
# ------------------------------------------------------------

CREATE TABLE `thostingkuendigungdatensicherung` (
  `kDatensicherung` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `nDatensicherung` tinyint(4) NOT NULL DEFAULT '0',
  `dDatensicherung` date DEFAULT NULL,
  `cDatensicherungUhrzeit` varchar(50) DEFAULT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `nErledigt` tinyint(4) NOT NULL DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  `dErledigt` datetime DEFAULT NULL,
  PRIMARY KEY (`kDatensicherung`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `kAccount` (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingkuendigungdomain
# ------------------------------------------------------------

CREATE TABLE `thostingkuendigungdomain` (
  `kDomain` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL DEFAULT '0',
  `kAccount` int(11) NOT NULL,
  `cDomain` varchar(255) NOT NULL,
  `ePosTyp` enum('','ZUSATZDOMAIN','MODUL') NOT NULL,
  `nDomain` tinyint(4) NOT NULL,
  `nErledigt` tinyint(4) NOT NULL DEFAULT '0',
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `dErledigt` datetime DEFAULT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDomain`),
  KEY `kAccount` (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`),
  KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingkuendigunggruende
# ------------------------------------------------------------

CREATE TABLE `thostingkuendigunggruende` (
  `kGrund` int(11) NOT NULL AUTO_INCREMENT,
  `cText` varchar(255) NOT NULL,
  `nSort` tinyint(4) NOT NULL,
  PRIMARY KEY (`kGrund`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingkuendigunggrund
# ------------------------------------------------------------

CREATE TABLE `thostingkuendigunggrund` (
  `kGrund` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `cGrund` text NOT NULL,
  `kAuswahl` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `nErledigt` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kGrund`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `kAdminlogin` (`kAdminlogin`,`nErledigt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingkuendigungsearch
# ------------------------------------------------------------

CREATE TABLE `thostingkuendigungsearch` (
  `kKuendigungSearch` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `kSearch` int(11) NOT NULL,
  `nSearch` tinyint(4) NOT NULL COMMENT '0 loeschen, 1 weiterverwenden',
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `nErledigt` tinyint(4) NOT NULL DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  `dErledigt` datetime NOT NULL,
  PRIMARY KEY (`kKuendigungSearch`),
  UNIQUE KEY `kHostingPos` (`kHostingPos`),
  UNIQUE KEY `kSearch` (`kSearch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingleistung
# ------------------------------------------------------------

CREATE TABLE `thostingleistung` (
  `kProduktLeistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufProdukt` int(11) NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cInfo` text NOT NULL,
  `nKostenMonat` float NOT NULL DEFAULT '0',
  `nKostenEinrichtung` float NOT NULL DEFAULT '0',
  `bSichtbar` int(11) NOT NULL,
  `bDomainRequired` tinyint(4) NOT NULL DEFAULT '0',
  `cRechnungposTyp` varchar(30) NOT NULL,
  `nSort` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kProduktLeistung`),
  KEY `bDomainRequired` (`bDomainRequired`,`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingleistungextra
# ------------------------------------------------------------

CREATE TABLE `thostingleistungextra` (
  `kProduktLeistungExtra` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufProdukt` int(11) NOT NULL DEFAULT '0',
  `kProduktLeistungGruppe` int(10) NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cBeschreibung` varchar(255) NOT NULL DEFAULT '',
  `eType` enum('','SELECT','INPUT','CHECKBOX') NOT NULL,
  `ePosTyp` enum('','MODUL','ZUSATZDOMAIN','ZUSATZMANDANT') NOT NULL,
  `eData` text NOT NULL,
  `nKostenMonat` float NOT NULL DEFAULT '0',
  `nKostenEinrichtung` float NOT NULL DEFAULT '0',
  `bRequire` tinyint(1) NOT NULL DEFAULT '0',
  `nMehrfach` enum('0','1') NOT NULL DEFAULT '0',
  `cURL` varchar(255) NOT NULL,
  `nInklusive` tinyint(4) NOT NULL DEFAULT '0',
  `nSort` int(11) DEFAULT NULL,
  PRIMARY KEY (`kProduktLeistungExtra`),
  KEY `nInklusive` (`nInklusive`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingleistungextradomain
# ------------------------------------------------------------

CREATE TABLE `thostingleistungextradomain` (
  `kHostingLeistungExtraDomain` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `fPreis` float(10,2) DEFAULT NULL,
  `nSort` int(11) DEFAULT NULL,
  PRIMARY KEY (`kHostingLeistungExtraDomain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingleistunggruppe
# ------------------------------------------------------------

CREATE TABLE `thostingleistunggruppe` (
  `kProduktLeistungGruppe` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kProduktLeistung` int(10) unsigned NOT NULL,
  `cName` varchar(255) NOT NULL,
  `bPrice` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`kProduktLeistungGruppe`),
  KEY `kProduktLeistung` (`kProduktLeistung`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingleistungmerkmal
# ------------------------------------------------------------

CREATE TABLE `thostingleistungmerkmal` (
  `kMerkmal` int(11) NOT NULL AUTO_INCREMENT,
  `kProduktLeistung` int(11) NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cValue` varchar(255) NOT NULL,
  `nSort` tinyint(4) NOT NULL,
  PRIMARY KEY (`kMerkmal`),
  KEY `kProduktLeistung` (`kProduktLeistung`),
  KEY `nSort` (`nSort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposactive
# ------------------------------------------------------------

CREATE TABLE `thostingposactive` (
  `kHostingLeistung` int(11) NOT NULL,
  `kHostingLeistungExtra` varchar(50) NOT NULL,
  `cMonat` varchar(50) NOT NULL,
  `nAnzahl` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kHostingLeistung`,`kHostingLeistungExtra`,`cMonat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposdomainauthcode
# ------------------------------------------------------------

CREATE TABLE `thostingposdomainauthcode` (
  `kAuthCode` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `cDomain` varchar(255) NOT NULL,
  `cAuthCode` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kAuthCode`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `cDomain` (`cDomain`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposextra
# ------------------------------------------------------------

CREATE TABLE `thostingposextra` (
  `kHostingPosExtra` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cWert` varchar(255) DEFAULT NULL,
  `nAufRechnung` tinyint(3) unsigned DEFAULT NULL,
  `cDomainUebernahme` varchar(255) NOT NULL,
  `cDomainKuendigung` varchar(250) NOT NULL,
  PRIMARY KEY (`kHostingPosExtra`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `cName` (`cName`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposextrahistory
# ------------------------------------------------------------

CREATE TABLE `thostingposextrahistory` (
  `kHostingPosExtraHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kHostingPosExtra` int(10) unsigned NOT NULL,
  `kHostingPos` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `cWert` varchar(255) DEFAULT NULL,
  `nAufRechnung` tinyint(3) unsigned DEFAULT NULL,
  `cDomainUebernahme` varchar(255) NOT NULL,
  `cDomainKuendigung` varchar(250) NOT NULL,
  `dGeloescht` datetime NOT NULL,
  `bErledigt` enum('y','n') NOT NULL DEFAULT 'n',
  PRIMARY KEY (`kHostingPosExtraHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposlizenz
# ------------------------------------------------------------

CREATE TABLE `thostingposlizenz` (
  `kHostingPos` int(11) NOT NULL,
  `kLizenz` int(11) NOT NULL,
  PRIMARY KEY (`kHostingPos`,`kLizenz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingpossearch
# ------------------------------------------------------------

CREATE TABLE `thostingpossearch` (
  `kHostingPos` int(11) NOT NULL,
  `kSearch` int(11) NOT NULL,
  PRIMARY KEY (`kHostingPos`,`kSearch`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingpossperre
# ------------------------------------------------------------

CREATE TABLE `thostingpossperre` (
  `kSperre` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `kAuftrag` int(11) NOT NULL,
  `dAuftrag` datetime NOT NULL,
  `kSperrung` int(11) NOT NULL,
  `dSperrung` datetime DEFAULT NULL,
  `kAufgehoben` int(11) NOT NULL,
  `dAufgehoben` datetime DEFAULT NULL,
  `kGeloest` int(11) DEFAULT '0',
  `dGeloest` datetime DEFAULT NULL,
  `kBereich` tinyint(1) NOT NULL,
  `kGrund` tinyint(1) NOT NULL,
  `cGrund` varchar(255) CHARACTER SET latin1 NOT NULL,
  `cIntVermerk` text CHARACTER SET latin1 NOT NULL,
  `nStatus` tinyint(1) NOT NULL DEFAULT '1',
  `dKuendigung` datetime DEFAULT NULL,
  PRIMARY KEY (`kSperre`),
  KEY `kAdminlogin` (`kAuftrag`),
  KEY `kSperrung` (`kSperrung`),
  KEY `kAufgehoben` (`kAufgehoben`),
  KEY `kGeloest` (`kGeloest`),
  KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingpossperrebereich
# ------------------------------------------------------------

CREATE TABLE `thostingpossperrebereich` (
  `kBereich` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`kBereich`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingpossperregrund
# ------------------------------------------------------------

CREATE TABLE `thostingpossperregrund` (
  `kGrund` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`kGrund`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingpossperrehistory
# ------------------------------------------------------------

CREATE TABLE `thostingpossperrehistory` (
  `kHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kSperre` int(11) DEFAULT NULL,
  `kHostingPos` int(11) NOT NULL,
  `kAuftrag` int(11) NOT NULL,
  `dAuftrag` datetime NOT NULL,
  `kSperrung` int(11) NOT NULL,
  `dSperrung` datetime DEFAULT NULL,
  `kAufgehoben` int(11) NOT NULL,
  `dAufgehoben` datetime DEFAULT NULL,
  `kGeloest` int(11) DEFAULT '0',
  `dGeloest` datetime DEFAULT NULL,
  `kBereich` tinyint(1) NOT NULL,
  `kGrund` tinyint(1) NOT NULL,
  `cGrund` varchar(255) NOT NULL,
  `cIntVermerk` text NOT NULL,
  `nStatus` tinyint(1) NOT NULL DEFAULT '1',
  `dKuendigung` datetime DEFAULT NULL,
  PRIMARY KEY (`kHistory`),
  KEY `kAdminlogin` (`kAuftrag`),
  KEY `kSperrung` (`kSperrung`),
  KEY `kAufgehoben` (`kAufgehoben`),
  KEY `kGeloest` (`kGeloest`),
  KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingpostag
# ------------------------------------------------------------

CREATE TABLE `thostingpostag` (
  `kHostingPosTag` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(10) unsigned DEFAULT NULL,
  `kTag` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(11) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kHostingPosTag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingposupgrade
# ------------------------------------------------------------

CREATE TABLE `thostingposupgrade` (
  `kUpgrade` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPosAlt` int(11) NOT NULL,
  `kHostingPosNeu` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  PRIMARY KEY (`kUpgrade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingredisserver
# ------------------------------------------------------------

CREATE TABLE `thostingredisserver` (
  `kServer` int(11) NOT NULL AUTO_INCREMENT,
  `cDomain` varchar(50) NOT NULL,
  `cIP` varchar(50) NOT NULL,
  `nAktiv` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kServer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingsqlinstallqueue
# ------------------------------------------------------------

CREATE TABLE `thostingsqlinstallqueue` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(13) NOT NULL DEFAULT '0',
  `kHostingsqldata` int(13) NOT NULL DEFAULT '0',
  `instancename` char(50) CHARACTER SET latin1 DEFAULT NULL,
  `instanceuser` char(50) CHARACTER SET latin1 DEFAULT NULL,
  `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `notify` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `kHostingsqldata` (`kHostingsqldata`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump thostingsslzertifikat
# ------------------------------------------------------------

CREATE TABLE `thostingsslzertifikat` (
  `kSSLZertifikat` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `cOrderID` varchar(50) DEFAULT NULL,
  `cCSR` text,
  `cPKey` text,
  `cCRT` text,
  `cCA` text,
  `dAusstellung` date DEFAULT NULL,
  `dGeandert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kSSLZertifikat`),
  UNIQUE KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingsslzertifikathistory
# ------------------------------------------------------------

CREATE TABLE `thostingsslzertifikathistory` (
  `kSSLZertifikat` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `cOrderID` varchar(50) DEFAULT NULL,
  `cCSR` text,
  `cPKey` text,
  `cCRT` text,
  `cCA` text,
  `dAusstellung` date DEFAULT NULL,
  `dGeandert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kSSLZertifikat`),
  UNIQUE KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump thostingtraffic
# ------------------------------------------------------------

CREATE TABLE `thostingtraffic` (
  `kHostingTraffic` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `nTraffic` bigint(20) NOT NULL,
  `nTrafficLimit` bigint(20) NOT NULL DEFAULT '0',
  `bOveruse` int(11) NOT NULL,
  `cServer` varchar(20) NOT NULL,
  `dTrafficMonat` date NOT NULL,
  `dLastUpdated` datetime NOT NULL,
  PRIMARY KEY (`kHostingTraffic`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `cServer` (`cServer`),
  KEY `dTrafficMonat` (`dTrafficMonat`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingtraffic_error
# ------------------------------------------------------------

CREATE TABLE `thostingtraffic_error` (
  `kHostingTraffic_error` int(11) NOT NULL AUTO_INCREMENT,
  `cErrorText` varchar(250) DEFAULT NULL,
  `cServer` varchar(20) NOT NULL,
  `dEingetragen` datetime DEFAULT NULL,
  PRIMARY KEY (`kHostingTraffic_error`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingupgrade
# ------------------------------------------------------------

CREATE TABLE `thostingupgrade` (
  `kHostingUpgrade` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) NOT NULL,
  `eStatus` enum('OFFEN','ABGESCHLOSSEN') DEFAULT 'OFFEN',
  `dErstellt` datetime NOT NULL,
  `dMailVersendet` datetime NOT NULL,
  PRIMARY KEY (`kHostingUpgrade`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `eStatus` (`eStatus`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingversionsupdate
# ------------------------------------------------------------

CREATE TABLE `thostingversionsupdate` (
  `kHostingPos` int(10) unsigned NOT NULL,
  `nVersion` int(10) unsigned NOT NULL,
  `nBuild` tinyint(4) unsigned DEFAULT NULL,
  `nVersionZiel` int(10) unsigned NOT NULL,
  `nBuildZiel` tinyint(4) unsigned DEFAULT NULL,
  `nVersionAlt` int(10) unsigned DEFAULT NULL,
  `nBuildAlt` tinyint(4) unsigned DEFAULT NULL,
  `nUpdate` tinyint(4) DEFAULT '0',
  `nError` tinyint(4) DEFAULT '0',
  `cError` text,
  `dErstellt` datetime NOT NULL,
  `dDatum` date NOT NULL,
  `cUhrzeit` varchar(50) NOT NULL,
  `dLastUpdate` datetime NOT NULL,
  PRIMARY KEY (`kHostingPos`),
  KEY `nUpdate` (`nUpdate`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump thostingwebspace
# ------------------------------------------------------------

CREATE TABLE `thostingwebspace` (
  `kWebspace` int(11) NOT NULL AUTO_INCREMENT,
  `kHostingPos` int(11) DEFAULT NULL,
  `nVerbrauch` int(11) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `dGeandert` datetime DEFAULT NULL,
  PRIMARY KEY (`kWebspace`),
  UNIQUE KEY `kHostingPos` (`kHostingPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ticket_data
# ------------------------------------------------------------

CREATE TABLE `ticket_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ticket_id` int(11) NOT NULL,
  `ticket_number` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `queue` varchar(255) NOT NULL,
  `agent` varchar(255) NOT NULL,
  `first_response` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ticket_id` (`ticket_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ticket_ratings
# ------------------------------------------------------------

CREATE TABLE `ticket_ratings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ticket_id` int(11) NOT NULL,
  `result_quality` tinyint(4) NOT NULL DEFAULT '0',
  `consultation_expertise` tinyint(4) NOT NULL DEFAULT '0',
  `kindness` tinyint(4) NOT NULL DEFAULT '0',
  `reliability` tinyint(4) NOT NULL DEFAULT '0',
  `comment` text,
  `internal_comment` text,
  `not_valid` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `rate_again` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ticket_id` (`ticket_id`),
  KEY `not_valid` (`not_valid`),
  KEY `created_at` (`created_at`),
  KEY `result_quality` (`result_quality`),
  KEY `consultation_expertise` (`consultation_expertise`),
  KEY `kindness` (`kindness`),
  KEY `reliability` (`reliability`),
  CONSTRAINT `ticket_ratings_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump tickets
# ------------------------------------------------------------

CREATE TABLE `tickets` (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL DEFAULT '0',
  `status_id` tinyint(4) NOT NULL DEFAULT '1',
  `is_accessible` tinyint(4) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `created` (`created_at`),
  KEY `status_id` (`status_id`),
  KEY `contact_id` (`contact_id`),
  KEY `active` (`is_accessible`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;



# Tabellen-Dump tickets_otrs_content
# ------------------------------------------------------------

CREATE TABLE `tickets_otrs_content` (
  `TicketID` int(10) unsigned NOT NULL,
  `TicketNumber` varchar(40) DEFAULT NULL,
  `Queue` varchar(255) DEFAULT NULL,
  `Title` varchar(255) DEFAULT NULL,
  `Created` datetime DEFAULT NULL,
  `FirstResponse` datetime DEFAULT NULL,
  `Priority` varchar(40) DEFAULT NULL,
  `State` varchar(40) DEFAULT NULL,
  `Owner` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tinkasso
# ------------------------------------------------------------

CREATE TABLE `tinkasso` (
  `kRechnung` int(11) NOT NULL,
  `nStatus` tinyint(4) NOT NULL DEFAULT '0',
  `nGesendet` tinyint(4) NOT NULL DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tinstallationsservice
# ------------------------------------------------------------

CREATE TABLE `tinstallationsservice` (
  `kLizenz` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tiplog
# ------------------------------------------------------------

CREATE TABLE `tiplog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `kaccount` int(10) NOT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `agent` text COLLATE utf8_unicode_ci,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump tiplog_uuid
# ------------------------------------------------------------

CREATE TABLE `tiplog_uuid` (
  `id` char(36) COLLATE utf8_unicode_ci NOT NULL,
  `kaccount` int(10) NOT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `agent` text COLLATE utf8_unicode_ci,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



# Tabellen-Dump tjtlshippingversanddienstleister
# ------------------------------------------------------------

CREATE TABLE `tjtlshippingversanddienstleister` (
  `kVersanddienstleister` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kVersanddienstleister`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tjtltesten
# ------------------------------------------------------------

CREATE TABLE `tjtltesten` (
  `kJtlTesten` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kEmpfehlungslistePos` int(10) unsigned DEFAULT NULL,
  `kTestshop` int(10) unsigned DEFAULT NULL,
  `k3rdPartyBuchung` int(10) unsigned DEFAULT NULL,
  `eStatus` enum('offen','erstellt','fehler') DEFAULT NULL,
  `nDemodaten` tinyint(3) unsigned DEFAULT NULL,
  `cFehler` text,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kJtlTesten`),
  KEY `tjtltesten_kAccount_index` (`kAccount`),
  KEY `tjtltesten_kEmpfehlungslistePos_index` (`kEmpfehlungslistePos`),
  KEY `tjtltesten_k3rdPartyBuchung_index` (`k3rdPartyBuchung`),
  KEY `tjtltesten_kTestshop_index` (`kTestshop`,`eStatus`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tkategorie
# ------------------------------------------------------------

CREATE TABLE `tkategorie` (
  `kKategorie` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kKategorie`),
  KEY `nAktiv` (`nAktiv`,`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tkaufprodukt
# ------------------------------------------------------------

CREATE TABLE `tkaufprodukt` (
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `eTyp` enum('Shop','ShopModul') NOT NULL,
  `nMinShopVersion` int(10) unsigned DEFAULT '0',
  `nMinWawiVersion` varchar(255) DEFAULT NULL,
  `cMinWawiVersion` varchar(255) DEFAULT NULL,
  `cWikiLink` varchar(255) NOT NULL,
  `cShopLink` varchar(255) NOT NULL,
  PRIMARY KEY (`kKaufprodukt`),
  KEY `eTyp` (`eTyp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tkaufproduktdownload
# ------------------------------------------------------------

CREATE TABLE `tkaufproduktdownload` (
  `kKaufproduktDownload` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `nVersion` int(10) unsigned DEFAULT NULL,
  `cPfad` varchar(255) DEFAULT NULL,
  `cChangelog` text,
  `dReleasedatum` date DEFAULT NULL,
  PRIMARY KEY (`kKaufproduktDownload`),
  KEY `dReleasedatum` (`dReleasedatum`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tkuendigung
# ------------------------------------------------------------

CREATE TABLE `tkuendigung` (
  `kKuendigung` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kHostingPos` int(11) NOT NULL,
  `cHTML` longtext NOT NULL,
  `cText` longtext NOT NULL,
  `nAnzahlGesendet` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dVersendet` datetime NOT NULL,
  PRIMARY KEY (`kKuendigung`),
  KEY `kAccount` (`kAccount`),
  KEY `kHostingPos` (`kHostingPos`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tkundenmail
# ------------------------------------------------------------

CREATE TABLE `tkundenmail` (
  `kKundenmail` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `cBetreff` varchar(255) DEFAULT NULL,
  `cHtml` longtext,
  `cText` longtext,
  `dErstellt` datetime DEFAULT NULL,
  `dZuletztVersendet` datetime DEFAULT NULL,
  PRIMARY KEY (`kKundenmail`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tland
# ------------------------------------------------------------

CREATE TABLE `tland` (
  `kLand` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cISO` varchar(255) NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kLand`),
  KEY `cISO` (`cISO`),
  KEY `nSort` (`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tland_ext
# ------------------------------------------------------------

CREATE TABLE `tland_ext` (
  `cISO` varchar(5) NOT NULL DEFAULT '',
  `cDeutsch` varchar(255) DEFAULT NULL,
  `cEnglisch` varchar(255) DEFAULT NULL,
  `nEU` tinyint(3) unsigned DEFAULT NULL,
  `nSort` int(11) NOT NULL,
  `cKontinent` varchar(255) DEFAULT NULL,
  `nSEPA` tinyint(4) NOT NULL DEFAULT '0',
  `cRegex` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`cISO`),
  KEY `cISO` (`cISO`),
  KEY `nSEPA` (`nSEPA`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tleistung
# ------------------------------------------------------------

CREATE TABLE `tleistung` (
  `kLeistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kProdukt` int(10) DEFAULT NULL,
  `kZertifikat` int(10) DEFAULT NULL,
  `cName` varchar(255) NOT NULL,
  `cText` varchar(255) DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  `nAufrufe` int(10) NOT NULL,
  PRIMARY KEY (`kLeistung`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `kProdukt` (`kProdukt`),
  KEY `kZertifikat` (`kZertifikat`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tleistungaufrufe
# ------------------------------------------------------------

CREATE TABLE `tleistungaufrufe` (
  `kLAufruf` int(10) NOT NULL AUTO_INCREMENT,
  `kLeistung` int(10) NOT NULL,
  `dDatum` datetime NOT NULL,
  PRIMARY KEY (`kLAufruf`),
  KEY `kLeistung` (`kLeistung`,`dDatum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlic
# ------------------------------------------------------------

CREATE TABLE `tlic` (
  `kLic` int(10) NOT NULL AUTO_INCREMENT,
  `kBundle` int(10) DEFAULT '0',
  `kLicense` int(10) NOT NULL,
  `kAccount` int(10) NOT NULL,
  `kApplication` int(10) NOT NULL,
  `fAmount` decimal(16,4) unsigned NOT NULL DEFAULT '0.0000',
  `eEdition` enum('','Standard','Professional','Enterprise') NOT NULL,
  `eTyp` enum('','Lease','Buy','Hosting') NOT NULL,
  `nActive` tinyint(4) NOT NULL,
  `nLimited` int(10) unsigned NOT NULL,
  `dCreated` datetime NOT NULL,
  `dExpires` datetime DEFAULT NULL,
  `dCancelOn` datetime DEFAULT NULL,
  `nCancelBy` tinyint(4) DEFAULT '0',
  `dCancelTo` date DEFAULT NULL,
  `nStatus` int(10) DEFAULT '0' COMMENT '0 Testphase, 1 Produktiv, 2 Dev',
  `nSupport` int(10) DEFAULT '0',
  `dProductive` date DEFAULT NULL,
  `nDiscount` tinyint(4) NOT NULL DEFAULT '0',
  `dUpdate` datetime DEFAULT NULL,
  PRIMARY KEY (`kLic`),
  KEY `kAccount` (`kAccount`),
  KEY `kLicense` (`kLicense`),
  KEY `kBundle` (`kBundle`),
  KEY `nStatus` (`nStatus`),
  KEY `kapplication` (`kApplication`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Abrechnung / Verwaltungs Tabelle für jtl_license.tlicense';


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `tlicafterupdate` AFTER UPDATE ON `tlic` FOR EACH ROW INSERT INTO tlichistory
SET kLic = NEW.kLic, 
kBundle = NEW.kBundle, 
kAccount = NEW.kAccount, 
dUpdate = NEW.dUpdate, 
eEdition = NEW.eEdition, 
eTyp = NEW.eTyp, 
dProductive = NEW.dProductive, 
dCancelOn = NEW.dCancelOn, 
dCancelTo = NEW.dCancelTo,
nCancelBy = NEW.nCancelBy,
nStatus = NEW.nStatus, 
nSupport = NEW.nSupport, 
nLimited = NEW.nLimited, 
nActive = NEW.nActive, 
dExpires = NEW.dExpires, 
kLicense = NEW.kLicense, 
fAmount = NEW.fAmount, 
kApplication = NEW.kApplication, 
nDiscount = NEW.nDiscount */;;
DELIMITER ;


# Tabellen-Dump tlicapplication
# ------------------------------------------------------------

CREATE TABLE `tlicapplication` (
  `kApplication` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kApplicationMain` int(11) unsigned DEFAULT '0',
  `cName` varchar(255) NOT NULL,
  `cDescription` varchar(255) DEFAULT NULL,
  `bUser` tinyint(4) NOT NULL DEFAULT '0',
  `nMaxVolumeUser` int(11) NOT NULL DEFAULT '0',
  `bPurchasable` tinyint(4) NOT NULL DEFAULT '0',
  `cType` varchar(255) DEFAULT NULL,
  `cProduct` varchar(50) DEFAULT NULL,
  `nTestDays` int(11) DEFAULT NULL,
  `nProlongTestDays` int(11) unsigned NOT NULL DEFAULT '0',
  `nProlongTestAmount` int(11) unsigned NOT NULL DEFAULT '0',
  `cAdditionalInfo` varchar(255) DEFAULT NULL,
  `fAmount` decimal(16,4) unsigned DEFAULT NULL,
  `nInterval` tinyint(4) DEFAULT '1',
  `cLink` varchar(255) DEFAULT NULL,
  `cVideo` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kApplication`),
  KEY `cType` (`cType`),
  KEY `kApplicationMain` (`kApplicationMain`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicapplication_old
# ------------------------------------------------------------

CREATE TABLE `tlicapplication_old` (
  `kApplication` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kApplicationMain` int(11) unsigned DEFAULT '0',
  `cName` varchar(255) NOT NULL,
  `cDescription` varchar(255) DEFAULT NULL,
  `cType` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kApplication`),
  KEY `cType` (`cType`),
  KEY `kApplicationMain` (`kApplicationMain`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicapplicationrequirement
# ------------------------------------------------------------

CREATE TABLE `tlicapplicationrequirement` (
  `kLicApplicationRequirement` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kApplication` int(10) unsigned NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cValue` varchar(255) NOT NULL,
  PRIMARY KEY (`kLicApplicationRequirement`),
  KEY `kApplication` (`kApplication`,`cKey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicapplicationtypedesc
# ------------------------------------------------------------

CREATE TABLE `tlicapplicationtypedesc` (
  `kDesc` int(11) NOT NULL AUTO_INCREMENT,
  `kApplication` int(11) DEFAULT NULL,
  `cType` varchar(50) DEFAULT NULL,
  `cWikiURL` varchar(255) DEFAULT NULL,
  `cVideoURL` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kDesc`),
  KEY `kApplication` (`kApplication`),
  KEY `cType` (`cType`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicapplicationversion
# ------------------------------------------------------------

CREATE TABLE `tlicapplicationversion` (
  `kLicApplicationVersion` int(11) NOT NULL AUTO_INCREMENT,
  `kApplication` int(11) NOT NULL,
  `cVersion` varchar(10) DEFAULT NULL,
  `cKompVon` varchar(10) DEFAULT NULL,
  `cKompBis` varchar(10) DEFAULT NULL,
  `cType` varchar(50) DEFAULT NULL,
  `dRelease` date DEFAULT NULL,
  `cFile` varchar(255) DEFAULT NULL,
  `nDownloads` int(10) unsigned NOT NULL DEFAULT '0',
  `cRequirementsURL` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kLicApplicationVersion`),
  KEY `kApplication` (`kApplication`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tliccode
# ------------------------------------------------------------

CREATE TABLE `tliccode` (
  `kCode` int(11) NOT NULL AUTO_INCREMENT,
  `kExtId` int(11) NOT NULL DEFAULT '0',
  `cOrderNr` varchar(20) NOT NULL,
  `cMail` varchar(255) NOT NULL DEFAULT '0',
  `kServicepartner` int(11) NOT NULL DEFAULT '0',
  `kLicense` int(11) DEFAULT '0',
  `eType` enum('','subscription','product') DEFAULT NULL COMMENT 'Typ des Codes (Produkt, Subskription)',
  `kAccount` int(11) DEFAULT '0',
  `cCode` varchar(29) DEFAULT '0',
  `kApplication` int(11) DEFAULT '0',
  `eEdition` enum('','Standard','Professional','Enterprise') NOT NULL,
  `cType` varchar(50) DEFAULT NULL COMMENT 'Typ der Applikation',
  `cDomain` varchar(255) DEFAULT NULL,
  `dCreated` datetime DEFAULT NULL,
  `cCreatedBy` varchar(255) DEFAULT NULL,
  `dUsed` datetime DEFAULT NULL,
  PRIMARY KEY (`kCode`),
  KEY `cCode` (`cCode`),
  KEY `cType` (`cType`),
  KEY `kApplication` (`kApplication`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tliccustomercaremail
# ------------------------------------------------------------

CREATE TABLE `tliccustomercaremail` (
  `kLicMail` int(11) NOT NULL AUTO_INCREMENT,
  `kLic` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kLicMail`),
  KEY `kLic` (`kLic`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicenseapihistory
# ------------------------------------------------------------

CREATE TABLE `tlicenseapihistory` (
  `kLicenseApiHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `kLicense` int(10) unsigned NOT NULL,
  `kOrder` int(10) unsigned NOT NULL,
  `kPurchaseProduct` int(10) unsigned NOT NULL,
  `cPaymentMethod` varchar(255) NOT NULL,
  `cParam` varchar(255) NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kLicenseApiHistory`),
  KEY `kAccount` (`kAccount`,`kLicense`),
  KEY `kAccount_2` (`kAccount`,`kOrder`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tlichistory
# ------------------------------------------------------------

CREATE TABLE `tlichistory` (
  `kLicHistory` int(10) NOT NULL AUTO_INCREMENT,
  `kLic` int(10) NOT NULL,
  `kBundle` int(10) DEFAULT '0',
  `kLicense` int(10) NOT NULL,
  `kAccount` int(10) NOT NULL,
  `kApplication` int(10) NOT NULL,
  `fAmount` decimal(16,4) unsigned NOT NULL DEFAULT '0.0000',
  `eEdition` enum('','Standard','Professional','Enterprise') NOT NULL,
  `eTyp` enum('','Lease','Buy','Hosting') NOT NULL,
  `nActive` tinyint(4) NOT NULL,
  `nLimited` int(10) unsigned NOT NULL,
  `dExpires` datetime DEFAULT NULL,
  `dCancelOn` date DEFAULT NULL,
  `nCancelBy` tinyint(4) DEFAULT '0',
  `dCancelTo` datetime DEFAULT NULL,
  `nStatus` int(10) DEFAULT '0',
  `nSupport` int(10) DEFAULT '0',
  `dProductive` date DEFAULT NULL,
  `nDiscount` tinyint(4) NOT NULL DEFAULT '0',
  `dUpdate` datetime DEFAULT NULL,
  PRIMARY KEY (`kLicHistory`),
  KEY `kAccount` (`kAccount`),
  KEY `kLicense` (`kLicense`),
  KEY `kBundle` (`kBundle`),
  KEY `kLic` (`kLic`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='History für tlic';



# Tabellen-Dump tlicrequirement
# ------------------------------------------------------------

CREATE TABLE `tlicrequirement` (
  `kLicRequirement` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRequirement` int(10) unsigned NOT NULL DEFAULT '0',
  `kLicense` int(10) unsigned NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cValue` varchar(255) NOT NULL,
  PRIMARY KEY (`kLicRequirement`),
  KEY `kLicense` (`kLicense`,`cKey`),
  KEY `kRequirement` (`kRequirement`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `tlicrequirementafterupdate` AFTER UPDATE ON `tlicrequirement` FOR EACH ROW BEGIN
	INSERT INTO tlicrequirementhistory SET kLicRequirement = NEW.kLicRequirement, kRequirement = NEW.kRequirement, kLicense = NEW.kLicense, cKey = new.cKey, cValue = new.cValue, dCreated = NOW();
END */;;
DELIMITER ;


# Tabellen-Dump tlicrequirement_backup
# ------------------------------------------------------------

CREATE TABLE `tlicrequirement_backup` (
  `kLicRequirement` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRequirement` int(10) unsigned NOT NULL DEFAULT '0',
  `kLicense` int(10) unsigned NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `cValue` varchar(255) NOT NULL,
  PRIMARY KEY (`kLicRequirement`),
  KEY `kLicense` (`kLicense`,`cKey`),
  KEY `kRequirement` (`kRequirement`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicrequirementhistory
# ------------------------------------------------------------

CREATE TABLE `tlicrequirementhistory` (
  `kLicRequirementHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kLicRequirement` int(11) DEFAULT NULL,
  `kRequirement` int(11) DEFAULT NULL,
  `kLicense` int(11) DEFAULT NULL,
  `cKey` varchar(255) DEFAULT NULL,
  `cValue` varchar(255) DEFAULT NULL,
  `dCreated` datetime DEFAULT NULL,
  PRIMARY KEY (`kLicRequirementHistory`),
  KEY `kLicense` (`kLicense`),
  KEY `cKey` (`cKey`),
  KEY `kRequirement` (`kRequirement`),
  KEY `kLicRequirement` (`kLicRequirement`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicsupport
# ------------------------------------------------------------

CREATE TABLE `tlicsupport` (
  `kSupport` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `nType` tinyint(4) DEFAULT NULL,
  `dCreated` datetime DEFAULT NULL,
  `dCancelTo` date DEFAULT NULL,
  `dCancelOn` datetime DEFAULT NULL,
  PRIMARY KEY (`kSupport`),
  KEY `kAccount` (`kAccount`),
  KEY `nType` (`nType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlictest
# ------------------------------------------------------------

CREATE TABLE `tlictest` (
  `kTest` int(11) NOT NULL AUTO_INCREMENT,
  `kApplication` int(11) NOT NULL DEFAULT '0',
  `kLicense` int(11) DEFAULT NULL,
  `cType` varchar(50) DEFAULT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `dCreated` datetime DEFAULT NULL,
  `dExpires` datetime DEFAULT NULL,
  `cEditor` varchar(36) NOT NULL DEFAULT '',
  PRIMARY KEY (`kTest`),
  KEY `kLicense` (`kLicense`),
  KEY `kAccount` (`kAccount`),
  KEY `dExpires` (`dExpires`),
  KEY `kApplication` (`kApplication`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlicuser
# ------------------------------------------------------------

CREATE TABLE `tlicuser` (
  `kUser` int(11) NOT NULL AUTO_INCREMENT,
  `kApplication` int(10) unsigned NOT NULL,
  `kLicense` int(10) unsigned NOT NULL,
  `nActive` tinyint(3) unsigned NOT NULL,
  `nDiscount` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `dCreated` datetime NOT NULL,
  `dCancelTo` date DEFAULT NULL,
  `dCancelOn` datetime DEFAULT NULL,
  `nCancelBy` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`kUser`),
  KEY `kApplication` (`kApplication`,`kLicense`),
  KEY `tlicuser_kApplication_kLicense_nActive_kUser_index` (`kApplication`,`kLicense`,`nActive`,`kUser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenz
# ------------------------------------------------------------

CREATE TABLE `tlizenz` (
  `kLizenz` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `kKey` int(10) unsigned NOT NULL,
  `eTyp` enum('std','dev','test','host','zeit','vmc','free','pro','ent','com') NOT NULL,
  `bBrandFree` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kLizenz`),
  KEY `cKey` (`cKey`,`kKey`),
  KEY `kAccount` (`kAccount`),
  KEY `eTyp` (`eTyp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenzdomainhistory
# ------------------------------------------------------------

CREATE TABLE `tlizenzdomainhistory` (
  `kLizenzdomainhistory` int(11) NOT NULL AUTO_INCREMENT,
  `kLizenz` int(11) NOT NULL,
  `cDomainOld` varchar(255) NOT NULL,
  `cDomainNew` varchar(255) NOT NULL,
  `cChangedBy` varchar(255) NOT NULL,
  `dChanged` datetime NOT NULL,
  PRIMARY KEY (`kLizenzdomainhistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tlizenzgruppe
# ------------------------------------------------------------

CREATE TABLE `tlizenzgruppe` (
  `kLizenzgruppe` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL DEFAULT '0',
  `cTitel` varchar(50) NOT NULL DEFAULT '0',
  `cBeschreibung` varchar(255) DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kLizenzgruppe`),
  KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenzhistory
# ------------------------------------------------------------

CREATE TABLE `tlizenzhistory` (
  `kLizenzHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kLizenz` int(10) unsigned NOT NULL,
  `kAccount` int(10) unsigned NOT NULL,
  `cKey` varchar(255) NOT NULL,
  `kKey` int(10) unsigned NOT NULL,
  `eTyp` enum('std','dev','test','host','zeit','vmc','free','pro','ent','com') NOT NULL,
  `bBrandFree` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kLizenzHistory`),
  KEY `cKey` (`cKey`,`kKey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tlizenzingruppe
# ------------------------------------------------------------

CREATE TABLE `tlizenzingruppe` (
  `kLizenzingruppe` int(11) NOT NULL AUTO_INCREMENT,
  `kLizenz` int(11) DEFAULT NULL,
  `kLizenzgruppe` int(11) DEFAULT NULL,
  PRIMARY KEY (`kLizenzingruppe`),
  KEY `kLizenz` (`kLizenz`),
  KEY `kLizenzgruppe` (`kLizenzgruppe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenzmigration
# ------------------------------------------------------------

CREATE TABLE `tlizenzmigration` (
  `kLizenzmigration` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kSeller` int(11) NOT NULL,
  `kAccountKunde` int(11) DEFAULT NULL,
  `cExtensionID` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `cEmail` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `cCustomerCompany` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dSubscriptionGueltigBis` date NOT NULL,
  `cDomain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cErrorMessage` text COLLATE utf8mb4_unicode_ci,
  `nEmailCustomerMatch` int(11) DEFAULT NULL,
  `nCompanyCustomerMatch` int(11) DEFAULT NULL,
  `nMatchingStatus` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '1 = success; 2 = warning; 3 = error; 4 = manuell',
  `nStatus` int(11) NOT NULL DEFAULT '1' COMMENT '1 = in Bearbeitung; 2 = Erfolgreich migriert; 3 = manuelle Zuordnung erforderlich; 4 = Nicht zuzuordnen',
  `dErfolgreichMigriert` datetime DEFAULT NULL,
  `dNichtZuzuordnen` datetime DEFAULT NULL,
  `dLastCheck` datetime DEFAULT NULL,
  `dErstellt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`kLizenzmigration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump tlizenzmigration_actions
# ------------------------------------------------------------

CREATE TABLE `tlizenzmigration_actions` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) NOT NULL,
  `action` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `payload` text COLLATE utf8mb4_unicode_ci,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `finished_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



# Tabellen-Dump tlizenzownerhistory
# ------------------------------------------------------------

CREATE TABLE `tlizenzownerhistory` (
  `kLizenz` int(11) NOT NULL,
  `kAccountAlt` int(11) NOT NULL,
  `kAccountNeu` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `dUmgestellt` datetime NOT NULL,
  KEY `kLizenz` (`kLizenz`),
  KEY `kAccountAlt` (`kAccountAlt`),
  KEY `kAccountNeu` (`kAccountNeu`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tlizenzsearch
# ------------------------------------------------------------

CREATE TABLE `tlizenzsearch` (
  `kLizenz` int(11) NOT NULL DEFAULT '0',
  `kSearch` int(11) NOT NULL DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kLizenz`,`kSearch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenzstats
# ------------------------------------------------------------

CREATE TABLE `tlizenzstats` (
  `kShop` int(11) unsigned NOT NULL,
  `nShopVersion` int(11) unsigned NOT NULL,
  `nWawiVersion` int(11) unsigned NOT NULL,
  `nAnfragen` int(11) unsigned NOT NULL,
  `dErstellt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `dZuletzt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  UNIQUE KEY `kShop` (`kShop`,`nShopVersion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tlizenzupgrade
# ------------------------------------------------------------

CREATE TABLE `tlizenzupgrade` (
  `kLizenzUpgrade` int(11) NOT NULL AUTO_INCREMENT,
  `kLizenz` int(11) NOT NULL,
  `eStatus` enum('OFFEN','ABGESCHLOSSEN') DEFAULT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kLizenzUpgrade`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmahnlauf
# ------------------------------------------------------------

CREATE TABLE `tmahnlauf` (
  `kMahnlauf` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kRechnung` int(11) NOT NULL,
  `nMahnstufe` tinyint(4) NOT NULL,
  `dTimestamp` datetime NOT NULL,
  PRIMARY KEY (`kMahnlauf`),
  KEY `kAccount` (`kAccount`),
  KEY `kRechnung` (`kRechnung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tmahnung
# ------------------------------------------------------------

CREATE TABLE `tmahnung` (
  `kMahnung` int(11) NOT NULL AUTO_INCREMENT,
  `kRechnung` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `nMahnstufe` int(11) NOT NULL,
  `cBetreff` varchar(255) DEFAULT NULL,
  `cNachrichtHtml` longtext,
  `cNachrichtText` longtext,
  `dVersendet` date DEFAULT NULL,
  PRIMARY KEY (`kMahnung`),
  KEY `kRechnung` (`kRechnung`),
  KEY `kAccount` (`kAccount`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmailchimp_webhook
# ------------------------------------------------------------

CREATE TABLE `tmailchimp_webhook` (
  `WEBHOOK` int(11) NOT NULL AUTO_INCREMENT,
  `EMAIL` varchar(255) NOT NULL,
  `TYPE` varchar(50) NOT NULL,
  `DATA` text NOT NULL,
  `FIRED` datetime NOT NULL,
  PRIMARY KEY (`WEBHOOK`),
  KEY `EMAIL` (`EMAIL`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tmailqueue
# ------------------------------------------------------------

CREATE TABLE `tmailqueue` (
  `kMailQueue` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kVorlage` int(10) unsigned DEFAULT NULL,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `cDataJSON` mediumtext,
  `cTriggerFile` varchar(255) DEFAULT NULL,
  `cStatus` enum('offen','versendet','fehler') DEFAULT NULL,
  `cFehler` varchar(255) DEFAULT NULL,
  `dZuVersendenAm` datetime DEFAULT NULL,
  `dVersendetAm` datetime DEFAULT NULL,
  `dErstelltAm` datetime DEFAULT NULL,
  PRIMARY KEY (`kMailQueue`),
  KEY `tmailqueue_dVersendetAm_cStatus_index` (`dVersendetAm`,`cStatus`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tmergehistory
# ------------------------------------------------------------

CREATE TABLE `tmergehistory` (
  `kMergeHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cKey` varchar(255) NOT NULL,
  `kKey` int(10) unsigned NOT NULL,
  `kAccount` int(10) unsigned NOT NULL,
  `kAccountTarget` int(10) unsigned NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kMergeHistory`),
  KEY `kAccountTarget` (`kAccountTarget`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmodulkey
# ------------------------------------------------------------

CREATE TABLE `tmodulkey` (
  `kModulKey` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cModul` varchar(255) NOT NULL DEFAULT '',
  `cKey` varchar(60) DEFAULT NULL,
  `cFirma` varchar(255) DEFAULT NULL,
  `nAnzahlFreischaltungen` int(10) unsigned DEFAULT '0',
  `dGueltigAb` date DEFAULT NULL,
  PRIMARY KEY (`kModulKey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmodulkeyfreischaltung
# ------------------------------------------------------------

CREATE TABLE `tmodulkeyfreischaltung` (
  `kModulKey` int(10) unsigned DEFAULT NULL,
  `cIP` varchar(255) DEFAULT NULL,
  `dDatum` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmodulkeyfreischaltung_fehler
# ------------------------------------------------------------

CREATE TABLE `tmodulkeyfreischaltung_fehler` (
  `cIP` varchar(255) DEFAULT NULL,
  `cFirma` varchar(255) NOT NULL DEFAULT '',
  `cKey` varchar(12) NOT NULL DEFAULT '',
  `dDatum` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tmp_keys
# ------------------------------------------------------------

CREATE TABLE `tmp_keys` (
  `kLicense` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tmulticonvert
# ------------------------------------------------------------

CREATE TABLE `tmulticonvert` (
  `kAccount` int(11) NOT NULL,
  `kLizenz` int(11) NOT NULL,
  `kLicense` int(11) NOT NULL,
  `cLizenzkey` varchar(255) NOT NULL,
  `dConvert` datetime NOT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tnews
# ------------------------------------------------------------

CREATE TABLE `tnews` (
  `kNews` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cBetreff` varchar(255) NOT NULL,
  `cText` text NOT NULL,
  `cShopIcon` varchar(255) NOT NULL,
  `cVorschauText` text NOT NULL,
  `cVorschauHome` varchar(255) NOT NULL,
  `cMetaTitle` varchar(255) NOT NULL,
  `cMetaDescription` varchar(255) NOT NULL,
  `cMetaKeywords` varchar(255) NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nKommentierbar` tinyint(4) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGueltigVon` datetime NOT NULL,
  PRIMARY KEY (`kNews`),
  KEY `nAktiv` (`nAktiv`,`dGueltigVon`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewskategorie
# ------------------------------------------------------------

CREATE TABLE `tnewskategorie` (
  `kNewsKategorie` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cMetaTitle` varchar(255) NOT NULL,
  `cMetaDescription` varchar(255) NOT NULL,
  `nSort` tinyint(3) unsigned NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `dLetzteAktualisierung` datetime NOT NULL,
  PRIMARY KEY (`kNewsKategorie`),
  KEY `nAktiv` (`nAktiv`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewskategorienews
# ------------------------------------------------------------

CREATE TABLE `tnewskategorienews` (
  `kNewsKategorieNews` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kNews` int(10) unsigned NOT NULL,
  `kNewsKategorie` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kNewsKategorieNews`),
  KEY `kNews` (`kNews`),
  KEY `kNewsKategorie` (`kNewsKategorie`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewskommentar
# ------------------------------------------------------------

CREATE TABLE `tnewskommentar` (
  `kNewsKommentar` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kNews` int(10) unsigned NOT NULL,
  `kKunde` int(10) unsigned NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cKommentar` text NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kNewsKommentar`),
  KEY `kNews` (`kNews`,`nAktiv`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewsletterblacklist
# ------------------------------------------------------------

CREATE TABLE `tnewsletterblacklist` (
  `kNewsletterBlacklist` int(11) NOT NULL AUTO_INCREMENT,
  `cEmail` varchar(250) NOT NULL,
  `dHinzugefuegt` datetime NOT NULL,
  PRIMARY KEY (`kNewsletterBlacklist`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tnewsletterempfaenger
# ------------------------------------------------------------

CREATE TABLE `tnewsletterempfaenger` (
  `kNewsletterEmpfaenger` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nAktiv` int(10) unsigned NOT NULL DEFAULT '0',
  `cAnrede` varchar(255) NOT NULL,
  `cTitel` varchar(255) DEFAULT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cOptCode` varchar(255) NOT NULL,
  `cLoeschCode` varchar(255) NOT NULL,
  `dEingetragen` datetime NOT NULL,
  `dLetzterNewsletter` datetime DEFAULT NULL,
  PRIMARY KEY (`kNewsletterEmpfaenger`),
  KEY `cEmail` (`cEmail`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewsletterempfaengerhistory
# ------------------------------------------------------------

CREATE TABLE `tnewsletterempfaengerhistory` (
  `kNewsletterEmpfaengerHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cAnrede` varchar(255) NOT NULL,
  `cTitel` varchar(255) DEFAULT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cOptCode` varchar(255) DEFAULT NULL,
  `cLoeschCode` varchar(255) DEFAULT NULL,
  `cAktion` varchar(255) NOT NULL,
  `dAusgetragen` datetime NOT NULL,
  `dEingetragen` datetime NOT NULL,
  `dLetzterNewsletter` datetime DEFAULT NULL,
  PRIMARY KEY (`kNewsletterEmpfaengerHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnewsmonatsuebersicht
# ------------------------------------------------------------

CREATE TABLE `tnewsmonatsuebersicht` (
  `kNewsMonatsUebersicht` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `nMonat` int(10) unsigned NOT NULL,
  `nJahr` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kNewsMonatsUebersicht`),
  KEY `nMonat` (`nMonat`,`nJahr`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tnummern
# ------------------------------------------------------------

CREATE TABLE `tnummern` (
  `nKundennummer` int(10) unsigned DEFAULT NULL,
  `nDebitorennummer` int(10) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tonboarding
# ------------------------------------------------------------

CREATE TABLE `tonboarding` (
  `kOnboarding` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL DEFAULT '0',
  `kAdminlogin` int(11) DEFAULT NULL,
  `nMinuten` int(11) DEFAULT NULL,
  `cKommentar` varchar(255) DEFAULT NULL,
  `dDatum` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kOnboarding`),
  KEY `kAdminlogin` (`kAdminlogin`),
  KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump torganisation
# ------------------------------------------------------------

CREATE TABLE `torganisation` (
  `kOrganisation` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `cPublicName` varchar(255) DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned DEFAULT NULL,
  `dAktualisiertAm` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kOrganisation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpartnereinladung
# ------------------------------------------------------------

CREATE TABLE `tpartnereinladung` (
  `kPartnereinladung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `cAnrede` varchar(20) DEFAULT NULL,
  `cNachname` varchar(255) DEFAULT NULL,
  `cEmail` varchar(255) DEFAULT NULL,
  `cKommentar` varchar(255) DEFAULT NULL,
  `cIdentifier` varchar(40) DEFAULT NULL,
  `cTyp` enum('Servicepartner','Steuerberater') DEFAULT NULL,
  `nLinkAufrufe` int(10) unsigned DEFAULT '0',
  `dVertragseinsicht` datetime DEFAULT NULL,
  `dAkzeptiert` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `nDeleted` tinyint(3) unsigned DEFAULT '0',
  PRIMARY KEY (`kPartnereinladung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpasswortvergessen
# ------------------------------------------------------------

CREATE TABLE `tpasswortvergessen` (
  `kAccount` int(11) NOT NULL,
  `cHash` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tpilotdatei
# ------------------------------------------------------------

CREATE TABLE `tpilotdatei` (
  `kDatei` int(11) NOT NULL AUTO_INCREMENT,
  `kProgramm` int(11) NOT NULL,
  `cDatei` varchar(255) NOT NULL,
  `cVersion` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `nDownloads` int(11) NOT NULL DEFAULT '0',
  `nAktiv` tinyint(4) NOT NULL DEFAULT '1',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kDatei`),
  KEY `kProgramm` (`kProgramm`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpilotfreigabe
# ------------------------------------------------------------

CREATE TABLE `tpilotfreigabe` (
  `kDatei` int(11) NOT NULL DEFAULT '0',
  `kAccount` int(11) NOT NULL DEFAULT '0',
  `dFreigabe` datetime DEFAULT NULL,
  PRIMARY KEY (`kDatei`,`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpilotprogramm
# ------------------------------------------------------------

CREATE TABLE `tpilotprogramm` (
  `kProgramm` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `dGueltigBis` date DEFAULT NULL,
  `dErstellt` datetime NOT NULL,
  `bSichtbarkeit` tinyint(4) DEFAULT '0',
  `cDatenschutzrichtlinie` text,
  `bOffenerDownload` tinyint(4) DEFAULT '0',
  `nHilfsmittelRubrik` int(11) DEFAULT NULL,
  PRIMARY KEY (`kProgramm`),
  KEY `dGueltigBis` (`dGueltigBis`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpilotsperre
# ------------------------------------------------------------

CREATE TABLE `tpilotsperre` (
  `kAccount` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `cGrund` text NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tpilotteilnehmer
# ------------------------------------------------------------

CREATE TABLE `tpilotteilnehmer` (
  `kProgramm` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dAbmeldung` datetime DEFAULT NULL,
  `dTeilnahme` datetime DEFAULT NULL,
  `dGesperrt` datetime DEFAULT NULL,
  `cNotiz` text,
  `bFreigegeben` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`kProgramm`,`kAccount`),
  KEY `tpilotteilnehmer_kAccount_index` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tplaneritem
# ------------------------------------------------------------

CREATE TABLE `tplaneritem` (
  `kPlaneritem` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminuser` int(11) NOT NULL,
  `timeFrom` time NOT NULL,
  `timeTill` time NOT NULL,
  `bFullday` enum('0','1') DEFAULT '0',
  `bPublic` enum('0','1') NOT NULL DEFAULT '0',
  `cTitle` varchar(255) NOT NULL,
  `cDescription` longtext NOT NULL,
  `dDateStart` date NOT NULL,
  `dDateEnd` date NOT NULL,
  `dCreated` datetime NOT NULL,
  `dEdited` datetime DEFAULT NULL,
  `dDeleted` datetime DEFAULT NULL,
  PRIMARY KEY (`kPlaneritem`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tpremiumservice
# ------------------------------------------------------------

CREATE TABLE `tpremiumservice` (
  `kPremiumservice` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kLizenz` int(11) NOT NULL,
  `kLicense` int(11) NOT NULL DEFAULT '0',
  `kAdminlogin` int(11) NOT NULL,
  `eServiceArt` enum('rundum','install','wawiclient','wawiserver','updateshop','installconnector','wawidbreparatur','installshipping') NOT NULL,
  `cNotiz` text NOT NULL,
  `dEingetragen` datetime NOT NULL,
  `dErledigt` datetime NOT NULL,
  PRIMARY KEY (`kPremiumservice`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `tpremiumserviceafterupdate` AFTER UPDATE ON `tpremiumservice` FOR EACH ROW BEGIN
	INSERT INTO tpremiumservicehistory SET kPremiumservice = NEW.kPremiumservice, kAccount = NEW.kAccount, kLizenz = NEW.kLizenz, kLicense = NEW.kLicense, kAdminlogin = NEW.kAdminlogin, eServiceArt = NEW.eServiceArt, cNotiz = NEW.cNotiz, dEingetragen = NEW.dEingetragen, dErledigt = NEW.dErledigt,dGeaendert = NOW();
END */;;
DELIMITER ;


# Tabellen-Dump tpremiumservicehistory
# ------------------------------------------------------------

CREATE TABLE `tpremiumservicehistory` (
  `kPremiumserviceHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kPremiumservice` int(11) NOT NULL DEFAULT '0',
  `kAccount` int(11) NOT NULL,
  `kLizenz` int(11) NOT NULL,
  `kLicense` int(11) NOT NULL DEFAULT '0',
  `kAdminlogin` int(11) NOT NULL,
  `eServiceArt` enum('rundum','install','wawiclient','wawiserver','updateshop','installconnector','wawidbreparatur','installshipping') NOT NULL,
  `cNotiz` text NOT NULL,
  `dEingetragen` datetime NOT NULL,
  `dErledigt` datetime NOT NULL,
  `dGeaendert` datetime NOT NULL,
  PRIMARY KEY (`kPremiumserviceHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tpremiumservicenotiz
# ------------------------------------------------------------

CREATE TABLE `tpremiumservicenotiz` (
  `kNotiz` int(11) NOT NULL AUTO_INCREMENT,
  `kPremiumservice` int(11) NOT NULL DEFAULT '0',
  `cNotiz` text NOT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kNotiz`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tprodukt
# ------------------------------------------------------------

CREATE TABLE `tprodukt` (
  `kProdukt` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cBildPfad` varchar(255) DEFAULT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kProdukt`),
  KEY `nAktiv` (`nAktiv`,`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tprotokoll
# ------------------------------------------------------------

CREATE TABLE `tprotokoll` (
  `kProtokoll` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kZertifikatanfrage` int(10) unsigned NOT NULL,
  `cBearbeiter` varchar(255) CHARACTER SET utf8 NOT NULL,
  `cAnmerkung` text CHARACTER SET utf8 NOT NULL,
  `dPruefdatum` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kProtokoll`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tprotokollanlage
# ------------------------------------------------------------

CREATE TABLE `tprotokollanlage` (
  `kProtokollAnlage` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kProtokoll` int(10) unsigned NOT NULL,
  `cID` varchar(255) CHARACTER SET utf8 NOT NULL,
  `cPfad` varchar(255) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`kProtokollAnlage`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tprotokollkriterium
# ------------------------------------------------------------

CREATE TABLE `tprotokollkriterium` (
  `kProtokollkriterium` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cTitel` varchar(255) CHARACTER SET utf8 NOT NULL,
  `cBeschreibung` text CHARACTER SET utf8 NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kProtokollkriterium`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tprotokollvorgang
# ------------------------------------------------------------

CREATE TABLE `tprotokollvorgang` (
  `kProtokollvorgang` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kProtokoll` int(10) unsigned NOT NULL,
  `kProtokollkriterium` int(10) unsigned NOT NULL,
  `nStatus` int(1) NOT NULL,
  `cNotiz` text CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`kProtokollvorgang`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trechnung
# ------------------------------------------------------------

CREATE TABLE `trechnung` (
  `kRechnung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kHosting` int(10) unsigned DEFAULT NULL,
  `cRechnungsart` varchar(255) NOT NULL,
  `nRechnungsnummer` int(10) unsigned DEFAULT NULL,
  `cRechnungsnummer` varchar(20) DEFAULT NULL,
  `cRechnungsmonat` varchar(255) DEFAULT NULL,
  `cKommentar` text,
  `dRechnungsdatum` date DEFAULT NULL,
  `cZahlungsart` varchar(255) NOT NULL DEFAULT 'LS',
  `cStatus` varchar(30) DEFAULT NULL,
  `dBezahlt` date DEFAULT NULL,
  `dAusgebucht` datetime DEFAULT NULL,
  `nRLS` tinyint(4) DEFAULT '0',
  `dInkasso` datetime DEFAULT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnung`),
  KEY `nRechnungsnummer` (`nRechnungsnummer`,`cRechnungsmonat`),
  KEY `kAccount` (`kAccount`),
  KEY `kHosting` (`kHosting`),
  KEY `cRechnungsnummer` (`cRechnungsnummer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungdirektleistung
# ------------------------------------------------------------

CREATE TABLE `trechnungdirektleistung` (
  `kRechnungDirektleistung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) DEFAULT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `kRechnungPos` int(11) NOT NULL DEFAULT '0',
  `kDirektleistungTyp` int(10) unsigned DEFAULT NULL,
  `kKaufprodukt` int(10) unsigned DEFAULT '0',
  `kEmpfehlungslistePos` int(10) unsigned DEFAULT '0',
  `cName` varchar(200) DEFAULT NULL,
  `fBetragNetto` double DEFAULT NULL,
  `nDeleted` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnungDirektleistung`),
  KEY `kAccount` (`kAccount`),
  KEY `kRechnungPos` (`kRechnungPos`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trechnungdirektleistungtag
# ------------------------------------------------------------

CREATE TABLE `trechnungdirektleistungtag` (
  `kRechnungDirektleistungTag` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRechnungDirektleistung` int(10) unsigned DEFAULT NULL,
  `kTag` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(11) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnungDirektleistungTag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungerstellung
# ------------------------------------------------------------

CREATE TABLE `trechnungerstellung` (
  `kAccount` int(10) unsigned NOT NULL DEFAULT '0',
  `cRechnungsmonat` varchar(20) NOT NULL DEFAULT '',
  `cKommentar` text,
  `dRechnungErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kAccount`,`cRechnungsmonat`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trechnungpos
# ------------------------------------------------------------

CREATE TABLE `trechnungpos` (
  `kRechnungPos` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRechnung` int(10) unsigned DEFAULT NULL,
  `kHostingPos` int(10) unsigned NOT NULL,
  `kSearch` int(11) NOT NULL DEFAULT '0',
  `kRepricer` int(11) NOT NULL DEFAULT '0',
  `kUserAmaRep` int(11) NOT NULL DEFAULT '0',
  `kLic` int(11) NOT NULL DEFAULT '0',
  `account_support_orders_id` int(10) unsigned NOT NULL DEFAULT '0',
  `kTrackAndTraceBuchung` int(10) unsigned NOT NULL DEFAULT '0',
  `kConnectorBuchung` int(10) unsigned NOT NULL DEFAULT '0',
  `kRechnungDirektleistung` int(11) NOT NULL DEFAULT '0',
  `cName` varchar(255) DEFAULT NULL,
  `fBetrag` double DEFAULT NULL,
  `fOffen` double NOT NULL DEFAULT '0',
  `fMwSt` double(4,2) DEFAULT NULL,
  `cPosTyp` varchar(30) NOT NULL,
  `nNichtProvisionierbar` tinyint(3) unsigned DEFAULT '0',
  PRIMARY KEY (`kRechnungPos`),
  KEY `kRechnung` (`kRechnung`),
  KEY `kHostingPos` (`kHostingPos`),
  KEY `kSearch` (`kSearch`),
  KEY `kRepricer` (`kRepricer`),
  KEY `kUserAmaRep` (`kUserAmaRep`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungskorrektur
# ------------------------------------------------------------

CREATE TABLE `trechnungskorrektur` (
  `kRechnungskorrektur` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kRechnung` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `nRechnungskorrekturnummer` int(11) DEFAULT NULL,
  `cRechnungskorrekturnummer` varchar(15) DEFAULT NULL,
  `cDruckAnmerkung` text,
  `cInternerKommentar` text,
  `cEmailText` text,
  `cZahlungsart` varchar(50) DEFAULT NULL,
  `cPDFDokumentPfad` varchar(255) DEFAULT NULL,
  `cStatus` enum('intern','zugestellt','ausgezahlt') DEFAULT NULL,
  `dPDFZugestellt` datetime DEFAULT NULL,
  `dAusgezahlt` datetime DEFAULT NULL,
  `dFiBuExport` datetime DEFAULT NULL,
  `dBearbeitet` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnungskorrektur`),
  KEY `cRechnungskorrekturnummer` (`cRechnungskorrekturnummer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungskorrekturpos
# ------------------------------------------------------------

CREATE TABLE `trechnungskorrekturpos` (
  `kRechnungskorrekturPos` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRechnungskorrektur` int(10) unsigned DEFAULT NULL,
  `nPosNr` smallint(5) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `fBetragNetto` decimal(30,2) DEFAULT NULL,
  `fMwSt` decimal(30,2) DEFAULT NULL,
  PRIMARY KEY (`kRechnungskorrekturPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungskorrekturzahlung
# ------------------------------------------------------------

CREATE TABLE `trechnungskorrekturzahlung` (
  `kRechnungskorrekturZahlung` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kRechnungskorrektur` int(10) unsigned DEFAULT NULL,
  `kRechnung` int(10) unsigned DEFAULT NULL,
  `kAdminLogin` int(10) unsigned DEFAULT NULL,
  `fBetrag` decimal(30,2) DEFAULT NULL,
  `cZahlungsart` enum('Ueberweisung','Verrechnung','Guthaben') DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnungskorrekturZahlung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trechnungvw
# ------------------------------------------------------------

CREATE TABLE `trechnungvw` (
  `kRechnungsVW` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cRechnungsnummer` varchar(255) DEFAULT NULL,
  `dRechnungsdatum` date DEFAULT NULL,
  `kKey` int(10) unsigned DEFAULT NULL,
  `cSystem` varchar(255) DEFAULT NULL,
  `nSigniert` tinyint(3) unsigned DEFAULT '0',
  `nVerifiziert` tinyint(3) unsigned DEFAULT '0',
  `nVersendet` tinyint(3) unsigned DEFAULT '0',
  `cDateiname` varchar(255) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kRechnungsVW`),
  KEY `kKey` (`kKey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump treferenz
# ------------------------------------------------------------

CREATE TABLE `treferenz` (
  `kReferenz` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) unsigned NOT NULL,
  `kProdukt` int(10) unsigned DEFAULT NULL,
  `kAccount` int(10) DEFAULT NULL,
  `cName` varchar(255) NOT NULL,
  `cGeschaeftsfuehrer` varchar(255) NOT NULL,
  `nJTLAktivSeit` int(11) NOT NULL,
  `cBildPfad` varchar(255) DEFAULT NULL,
  `cURL` varchar(255) NOT NULL,
  `cSortiment` varchar(255) NOT NULL,
  `kBranche` tinyint(4) NOT NULL,
  `kAnzahlMitarbeiter` tinyint(4) NOT NULL,
  `kVersandvolumen` tinyint(4) NOT NULL,
  `cAnsprechpartnerName` varchar(255) NOT NULL,
  `cAnsprechpartnerMail` varchar(255) NOT NULL,
  `kFokus1` tinyint(4) NOT NULL,
  `kFokus2` tinyint(4) NOT NULL,
  `kWeitere1` tinyint(4) DEFAULT NULL,
  `kWeitere2` tinyint(4) DEFAULT NULL,
  `kWeitere3` tinyint(4) DEFAULT NULL,
  `kWeitere4` tinyint(4) DEFAULT NULL,
  `kWeitere5` tinyint(4) DEFAULT NULL,
  `kPlugin1` int(11) DEFAULT NULL,
  `kPlugin2` int(11) DEFAULT NULL,
  `kPlugin3` int(11) DEFAULT NULL,
  `kPlugin4` int(11) DEFAULT NULL,
  `kPlugin5` int(11) DEFAULT NULL,
  `kPlugin6` int(11) DEFAULT NULL,
  `kPlugin7` int(11) DEFAULT NULL,
  `kPlugin8` int(11) DEFAULT NULL,
  `kPlugin9` int(11) DEFAULT NULL,
  `kPlugin10` int(11) DEFAULT NULL,
  `dProjektbeginn` date DEFAULT NULL,
  `cProjektdauer` varchar(50) NOT NULL,
  `kProjektkosten` tinyint(4) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `kServicepartner1` int(11) NOT NULL,
  `kServicepartner2` int(11) NOT NULL,
  `kServicepartner3` int(11) NOT NULL,
  `kTechnologiepartner1` int(11) DEFAULT NULL,
  `kTechnologiepartner2` int(11) DEFAULT NULL,
  `kTechnologiepartner3` int(11) DEFAULT NULL,
  `cDienstleister1` varchar(255) DEFAULT NULL,
  `cDienstleister2` varchar(255) DEFAULT NULL,
  `cDienstleister3` varchar(255) DEFAULT NULL,
  `nAktiv` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `nSort` int(10) unsigned NOT NULL,
  `nBewertet` tinyint(1) NOT NULL DEFAULT '0',
  `nNichtVerkn` tinyint(1) NOT NULL DEFAULT '0',
  `nGewichtungJTL` tinyint(4) NOT NULL DEFAULT '0',
  `dErstellt` datetime DEFAULT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  PRIMARY KEY (`kReferenz`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `nBewertet` (`nBewertet`,`nNichtVerkn`),
  KEY `nGewichtungJTL` (`nGewichtungJTL`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzbewertung
# ------------------------------------------------------------

CREATE TABLE `treferenzbewertung` (
  `kReferenzBewertung` int(10) NOT NULL AUTO_INCREMENT,
  `kReferenz` int(10) NOT NULL,
  `nErreichbarkeit` int(10) NOT NULL,
  `nZuverlaessigkeit` int(10) NOT NULL,
  `nQualitaet` int(10) NOT NULL,
  `nPreisLeistung` int(10) NOT NULL,
  `cKundenkommentar` text NOT NULL,
  `nOeffentlich` tinyint(4) NOT NULL,
  `nZufrieden` tinyint(4) NOT NULL,
  `nWeiterempfehlen` tinyint(4) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kReferenzBewertung`),
  KEY `kReferenz` (`kReferenz`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzbilder
# ------------------------------------------------------------

CREATE TABLE `treferenzbilder` (
  `kBild` int(11) NOT NULL AUTO_INCREMENT,
  `kReferenz` int(11) NOT NULL,
  `cBeschreibung` varchar(255) DEFAULT NULL,
  `cBild` varchar(50) DEFAULT NULL,
  `eTyp` enum('','Screenshot','Logo','Impression') DEFAULT NULL,
  `eTypDetail` enum('','Default','Startseite','Detailseite','Firmenlogo','Portrait Geschäftsführung','Team-/Gruppenfoto','Außenansicht Unternehmen','Foto Büro & Verwaltung','Foto Lager & Versand') DEFAULT NULL,
  PRIMARY KEY (`kBild`),
  KEY `kReferenz` (`kReferenz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzen
# ------------------------------------------------------------

CREATE TABLE `treferenzen` (
  `kReferenzen` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKategorie` int(10) unsigned NOT NULL,
  `kServicepartner` int(10) unsigned DEFAULT NULL,
  `cName` varchar(255) NOT NULL,
  `cMail` varchar(255) DEFAULT NULL,
  `cURL` varchar(255) NOT NULL,
  `cBeschreibung` text,
  `cBildPfad` varchar(255) NOT NULL,
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nHighlight` tinyint(4) NOT NULL DEFAULT '0',
  `nSort` int(10) unsigned NOT NULL,
  `cOverlayTitel` varchar(255) NOT NULL,
  `cOverlayText` varchar(255) NOT NULL,
  `dBenachrichtigt` datetime DEFAULT NULL,
  PRIMARY KEY (`kReferenzen`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzgeschaeftsbereich
# ------------------------------------------------------------

CREATE TABLE `treferenzgeschaeftsbereich` (
  `kReferenzGeschaeftsbereich` int(11) NOT NULL AUTO_INCREMENT,
  `kReferenz` int(11) NOT NULL,
  `eType` enum('','LAGER','VERTRIEB','MARKETING') NOT NULL,
  `kGeschaeftsbereich` int(11) DEFAULT NULL,
  `cCustom` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kReferenzGeschaeftsbereich`),
  KEY `kReferenz` (`kReferenz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzgeschaeftsbereiche
# ------------------------------------------------------------

CREATE TABLE `treferenzgeschaeftsbereiche` (
  `kGeschaeftsbereich` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `eTyp` enum('LAGER','VERTRIEB','MARKETING') DEFAULT NULL,
  `nSort` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`kGeschaeftsbereich`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzleistung
# ------------------------------------------------------------

CREATE TABLE `treferenzleistung` (
  `kReferenzLeistung` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) NOT NULL,
  `kReferenz` int(11) NOT NULL,
  `kLeistung` int(11) NOT NULL,
  PRIMARY KEY (`kReferenzLeistung`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump treferenzlog
# ------------------------------------------------------------

CREATE TABLE `treferenzlog` (
  `kReferenzLog` int(11) NOT NULL AUTO_INCREMENT,
  `kReferenz` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) DEFAULT '0',
  `cAktion` varchar(255) DEFAULT NULL,
  `cNachricht` varchar(255) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kReferenzLog`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tregistrierungszweck
# ------------------------------------------------------------

CREATE TABLE `tregistrierungszweck` (
  `kRegistrierungszweck` tinyint(3) unsigned DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trepricer_customercare
# ------------------------------------------------------------

CREATE TABLE `trepricer_customercare` (
  `kAccount` int(11) NOT NULL AUTO_INCREMENT,
  `nProductsCount` int(11) NOT NULL,
  `nMailverschickt` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dAktualisiert` datetime NOT NULL,
  PRIMARY KEY (`kAccount`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trepricerabrechnung
# ------------------------------------------------------------

CREATE TABLE `trepricerabrechnung` (
  `kAccount` int(10) unsigned DEFAULT NULL,
  `kUser` int(10) unsigned NOT NULL,
  `cName` varchar(100) DEFAULT NULL,
  `nAbrechenbareTage` tinyint(3) unsigned DEFAULT NULL,
  `nSKUs` int(10) unsigned DEFAULT NULL,
  `fKosten` float(10,2) DEFAULT NULL,
  `nKostenfrei` tinyint(3) unsigned DEFAULT NULL,
  `dProduktiv` datetime DEFAULT NULL,
  `cZeitraum` varchar(10) NOT NULL,
  PRIMARY KEY (`cZeitraum`,`kUser`),
  KEY `trepricerabrechnung_kAccount_cZeitraum_index` (`kAccount`,`cZeitraum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump trepricerevent
# ------------------------------------------------------------

CREATE TABLE `trepricerevent` (
  `kRepricerEvent` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `nType` tinyint(4) NOT NULL COMMENT '1 = User löschen, 2 = Testzeitraum verlängern',
  `cLog` text NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kRepricerEvent`),
  KEY `kAccount` (`kAccount`,`nType`,`dCreated`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trepricerkuendigung
# ------------------------------------------------------------

CREATE TABLE `trepricerkuendigung` (
  `kRepricer` int(11) NOT NULL,
  `dKuendigungZum` date DEFAULT NULL,
  `dGekuendigt` datetime DEFAULT NULL,
  `bKuendigungErfolgreich` tinyint(1) NOT NULL DEFAULT '0',
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `dKuendigungAm` datetime DEFAULT NULL,
  PRIMARY KEY (`kRepricer`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump trepricerlog
# ------------------------------------------------------------

CREATE TABLE `trepricerlog` (
  `kLog` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `cContent` text NOT NULL,
  `fVersion` double unsigned NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kLog`),
  KEY `fVersion` (`fVersion`),
  KEY `dCreated` (`dCreated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump trepricertarifhistory
# ------------------------------------------------------------

CREATE TABLE `trepricertarifhistory` (
  `kRepricerTarifHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `kAdminlogin` int(10) unsigned DEFAULT '0',
  `kRepricer` int(10) unsigned NOT NULL,
  `cMode` varchar(255) NOT NULL,
  `cExecutionPerson` varchar(255) NOT NULL,
  `dChanged` datetime NOT NULL,
  PRIMARY KEY (`kRepricerTarifHistory`),
  KEY `kAccount` (`kAccount`,`kAdminlogin`,`kRepricer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tsearch_customercare
# ------------------------------------------------------------

CREATE TABLE `tsearch_customercare` (
  `kSearch` int(11) NOT NULL,
  `nCoreCount` int(11) NOT NULL,
  `nMailverschickt` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dAktualisiert` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsearchevent
# ------------------------------------------------------------

CREATE TABLE `tsearchevent` (
  `kSearchEvent` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `nType` tinyint(4) NOT NULL COMMENT '1 = Usershop löschen, 2 = Testzeitraum verlängern',
  `cLog` text NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kSearchEvent`),
  KEY `kAccount` (`kAccount`,`nType`,`dCreated`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsearchkuendigung
# ------------------------------------------------------------

CREATE TABLE `tsearchkuendigung` (
  `kSearch` int(11) NOT NULL,
  `dKuendigungZum` date DEFAULT NULL,
  `dKuendigungAm` datetime DEFAULT NULL,
  `dGekuendigt` datetime DEFAULT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kSearch`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsearchkuendigunghistory
# ------------------------------------------------------------

CREATE TABLE `tsearchkuendigunghistory` (
  `kSearchkuendigung` int(11) NOT NULL AUTO_INCREMENT,
  `kSearch` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `cAction` enum('quit','recall') DEFAULT 'quit',
  `cAenderungDurch` varchar(255) NOT NULL,
  `dKuendigungZum` date NOT NULL,
  `dEingetragen` datetime NOT NULL,
  PRIMARY KEY (`kSearchkuendigung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsearchtarife
# ------------------------------------------------------------

CREATE TABLE `tsearchtarife` (
  `kSearchtarif` int(11) NOT NULL AUTO_INCREMENT,
  `cTarifname` varchar(255) NOT NULL,
  `cAnzeigename` varchar(255) NOT NULL,
  `fPreis` float(10,2) NOT NULL,
  `nBuchbar` int(11) NOT NULL,
  `nSort` int(11) NOT NULL,
  PRIMARY KEY (`kSearchtarif`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsearchtarifhistory
# ------------------------------------------------------------

CREATE TABLE `tsearchtarifhistory` (
  `kSearchtarifhistory` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `kSearch` int(11) NOT NULL,
  `cTarifalt` varchar(255) NOT NULL,
  `cTarifneu` varchar(255) NOT NULL,
  `cAenderungDurch` varchar(255) NOT NULL,
  `dGeaendert` datetime NOT NULL,
  PRIMARY KEY (`kSearchtarifhistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tservicepartner
# ------------------------------------------------------------

CREATE TABLE `tservicepartner` (
  `kServicepartner` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAnsprechpartner` int(11) DEFAULT NULL,
  `kLand` int(10) unsigned NOT NULL,
  `kGeschaeftsform` tinyint(3) unsigned DEFAULT NULL,
  `cFirmensitz` varchar(255) NOT NULL,
  `nGruendungsjahr` int(11) NOT NULL DEFAULT '0',
  `cUSTID` varchar(255) DEFAULT NULL,
  `cHRNR` varchar(255) DEFAULT NULL,
  `cHROrt` varchar(255) DEFAULT NULL,
  `cGesellschafter` varchar(255) DEFAULT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cStrasse` varchar(255) NOT NULL,
  `cAdresszusatz` varchar(255) DEFAULT NULL,
  `cPLZ` varchar(255) NOT NULL,
  `cOrt` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL DEFAULT '',
  `cWWW` varchar(255) DEFAULT NULL,
  `cOnlineshop` varchar(255) DEFAULT NULL,
  `cBildPfad` varchar(255) DEFAULT NULL,
  `cLogoPfad` varchar(255) NOT NULL DEFAULT '',
  `cBild1` varchar(255) DEFAULT NULL,
  `cBild2` varchar(255) DEFAULT NULL,
  `cBild3` varchar(255) DEFAULT NULL,
  `cBild4` varchar(255) DEFAULT NULL,
  `cBeschreibung1` text NOT NULL,
  `cBeschreibung2` text NOT NULL,
  `cBeschreibung3` text NOT NULL,
  `cBeschreibung4` text NOT NULL,
  `cBeschreibung` text,
  `cKurzbeschreibung` varchar(140) DEFAULT NULL,
  `cVermerkung` text,
  `kKundensegment1` tinyint(1) DEFAULT NULL,
  `kKundensegment2` tinyint(1) DEFAULT NULL,
  `kKundensegment3` tinyint(1) DEFAULT NULL,
  `kAnvisierteProjektgroessen` tinyint(1) DEFAULT NULL,
  `kBisherigeProjektgroessen` tinyint(1) DEFAULT NULL,
  `nMitarbeiterFirma` tinyint(4) DEFAULT NULL,
  `nMitarbeiterJTL` tinyint(4) DEFAULT NULL,
  `nMitarbeiterNetzwerk` tinyint(4) DEFAULT NULL,
  `cFacebook` varchar(255) DEFAULT NULL,
  `cXING` varchar(255) DEFAULT NULL,
  `cTwitter` varchar(255) DEFAULT NULL,
  `cYouTube` varchar(255) DEFAULT NULL,
  `dLat` double NOT NULL DEFAULT '0',
  `dLng` double NOT NULL DEFAULT '0',
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nRestricted` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nPremium` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `nSort` int(10) unsigned NOT NULL DEFAULT '0',
  `nAufrufe` int(10) NOT NULL DEFAULT '0',
  `fMalus` double NOT NULL DEFAULT '1',
  `nVertragGesendet` int(11) NOT NULL,
  `nProjektNews` int(11) NOT NULL DEFAULT '1',
  `dErstellt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `dAuslastungBis` date DEFAULT NULL,
  `dGeaendert` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `badgestatus` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kServicepartner`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `cFirma` (`cFirma`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tservicepartneraufrufe
# ------------------------------------------------------------

CREATE TABLE `tservicepartneraufrufe` (
  `kSPAufruf` int(10) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) NOT NULL,
  `dDatum` datetime NOT NULL,
  PRIMARY KEY (`kSPAufruf`),
  KEY `kServicepartner` (`kServicepartner`,`dDatum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tservicepartnerhistory
# ------------------------------------------------------------

CREATE TABLE `tservicepartnerhistory` (
  `kHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) unsigned NOT NULL,
  `kAnsprechpartner` int(11) DEFAULT NULL,
  `kLand` int(10) unsigned NOT NULL,
  `kGeschaeftsform` tinyint(3) unsigned DEFAULT NULL,
  `cFirmensitz` varchar(255) NOT NULL,
  `nGruendungsjahr` int(11) NOT NULL,
  `cUSTID` varchar(255) DEFAULT NULL,
  `cHRNR` varchar(255) DEFAULT NULL,
  `cHROrt` varchar(255) DEFAULT NULL,
  `cGesellschafter` varchar(255) DEFAULT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cStrasse` varchar(255) NOT NULL,
  `cAdresszusatz` varchar(255) DEFAULT NULL,
  `cPLZ` varchar(255) NOT NULL,
  `cOrt` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cWWW` varchar(255) DEFAULT NULL,
  `cOnlineshop` varchar(255) DEFAULT NULL,
  `cBildPfad` varchar(255) DEFAULT NULL,
  `cLogoPfad` varchar(255) NOT NULL,
  `cBild1` varchar(255) DEFAULT NULL,
  `cBild2` varchar(255) DEFAULT NULL,
  `cBild3` varchar(255) DEFAULT NULL,
  `cBild4` varchar(255) DEFAULT NULL,
  `cBeschreibung1` text NOT NULL,
  `cBeschreibung2` text NOT NULL,
  `cBeschreibung3` text NOT NULL,
  `cBeschreibung4` text NOT NULL,
  `cBeschreibung` text,
  `cKurzbeschreibung` varchar(140) DEFAULT NULL,
  `cVermerkung` text,
  `kKundensegment1` tinyint(1) DEFAULT NULL,
  `kKundensegment2` tinyint(1) DEFAULT NULL,
  `kKundensegment3` tinyint(1) DEFAULT NULL,
  `kAnvisierteProjektgroessen` tinyint(1) DEFAULT NULL,
  `kBisherigeProjektgroessen` tinyint(1) DEFAULT NULL,
  `nMitarbeiterFirma` tinyint(4) DEFAULT NULL,
  `nMitarbeiterJTL` tinyint(4) DEFAULT NULL,
  `nMitarbeiterNetzwerk` tinyint(4) DEFAULT NULL,
  `cFacebook` varchar(255) DEFAULT NULL,
  `cXING` varchar(255) DEFAULT NULL,
  `cTwitter` varchar(255) DEFAULT NULL,
  `cYouTube` varchar(255) DEFAULT NULL,
  `dLat` double NOT NULL DEFAULT '0',
  `dLng` double NOT NULL DEFAULT '0',
  `nAktiv` tinyint(3) unsigned NOT NULL,
  `nPremium` tinyint(3) unsigned NOT NULL,
  `nSort` int(10) unsigned NOT NULL,
  `nAufrufe` int(10) NOT NULL,
  `fMalus` double NOT NULL DEFAULT '1',
  `nVertragGesendet` int(11) NOT NULL,
  `nProjektNews` int(11) NOT NULL DEFAULT '1',
  `dErstellt` datetime NOT NULL,
  `dAuslastungBis` date DEFAULT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  `badgestatus` tinyint(4) NOT NULL DEFAULT '0',
  `dUpdate` datetime DEFAULT NULL,
  PRIMARY KEY (`kHistory`),
  KEY `nAktiv` (`nAktiv`,`nSort`),
  KEY `cFirma` (`cFirma`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tservicepartnerstatechange
# ------------------------------------------------------------

CREATE TABLE `tservicepartnerstatechange` (
  `kId` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) NOT NULL,
  `nAktivOLD` tinyint(4) NOT NULL,
  `nAktivNEW` tinyint(4) NOT NULL,
  `dCreated` datetime NOT NULL,
  PRIMARY KEY (`kId`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tshop
# ------------------------------------------------------------

CREATE TABLE `tshop` (
  `kShop` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `cLizenzkey` varchar(255) NOT NULL,
  `cDomain` varchar(255) NOT NULL,
  `cOutHash` varchar(255) NOT NULL,
  `cPfad` varchar(255) DEFAULT NULL,
  `nLaufendeVersion` int(10) unsigned NOT NULL,
  `dDownloadBis` date NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kShop`),
  KEY `cOutHash` (`cOutHash`),
  KEY `cLizenzkey` (`cLizenzkey`),
  KEY `cDomain` (`cDomain`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tshophistory
# ------------------------------------------------------------

CREATE TABLE `tshophistory` (
  `kShophistory` int(10) NOT NULL AUTO_INCREMENT,
  `kShop` int(10) unsigned NOT NULL,
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `cLizenzkey` varchar(255) NOT NULL,
  `cDomain` varchar(255) NOT NULL,
  `cOutHash` varchar(255) NOT NULL,
  `cPfad` varchar(255) DEFAULT NULL,
  `nLaufendeVersion` int(10) unsigned NOT NULL,
  `dDownloadBis` date NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kShophistory`),
  KEY `cOutHash` (`cOutHash`),
  KEY `cLizenzkey` (`cLizenzkey`),
  KEY `cDomain` (`cDomain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tshopmodul
# ------------------------------------------------------------

CREATE TABLE `tshopmodul` (
  `kShopModul` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `kAccountGebunden` int(10) unsigned DEFAULT '0',
  `kShop` int(10) unsigned DEFAULT '0',
  `cLizenzkey` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dFreigeschaltet` datetime DEFAULT NULL,
  PRIMARY KEY (`kShopModul`),
  KEY `kShop` (`kShop`),
  KEY `cLizenzkey` (`cLizenzkey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tshopmodul_history
# ------------------------------------------------------------

CREATE TABLE `tshopmodul_history` (
  `kShopModulHistory` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kShopModul` int(10) unsigned NOT NULL,
  `kKaufprodukt` int(10) unsigned NOT NULL,
  `kAccountGebunden` int(10) unsigned DEFAULT '0',
  `kShop` int(10) unsigned DEFAULT '0',
  `cLizenzkey` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dFreigeschaltet` datetime DEFAULT NULL,
  PRIMARY KEY (`kShopModulHistory`),
  KEY `kShop` (`kShop`),
  KEY `cLizenzkey` (`cLizenzkey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tshopmodulhistory
# ------------------------------------------------------------

CREATE TABLE `tshopmodulhistory` (
  `kShopModulHistory` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) unsigned DEFAULT NULL,
  `kShop` int(11) unsigned DEFAULT NULL,
  `kShopModul` int(10) unsigned DEFAULT NULL,
  `cLizenzkey` varchar(255) DEFAULT NULL,
  `cError` varchar(255) NOT NULL,
  `eAktion` enum('Add','Del') NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kShopModulHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tshopversion
# ------------------------------------------------------------

CREATE TABLE `tshopversion` (
  `kShopVersion` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nVersion` int(3) NOT NULL,
  `nBuild` tinyint(4) NOT NULL,
  `eChannel` enum('Stable','Community Free') NOT NULL DEFAULT 'Stable',
  `nType` int(1) NOT NULL DEFAULT '0' COMMENT '0=recommended, 1=feature, 2=critical',
  `cURL` varchar(255) CHARACTER SET utf8 NOT NULL,
  `dAvailableSince` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kShopVersion`),
  KEY `nVersion` (`nVersion`,`kShopVersion`),
  KEY `dAvailableSince` (`dAvailableSince`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsi_plesk_log
# ------------------------------------------------------------

CREATE TABLE `tsi_plesk_log` (
  `kLog` int(11) NOT NULL AUTO_INCREMENT,
  `cRequest` text,
  `cResponse` text,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kLog`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsla
# ------------------------------------------------------------

CREATE TABLE `tsla` (
  `kSLA` int(11) NOT NULL AUTO_INCREMENT,
  `cSLA` tinytext NOT NULL,
  `eType` enum('','Standard','Servicepartner','Premium') NOT NULL,
  `cBeschreibung` varchar(50) NOT NULL,
  `nPrio` int(11) NOT NULL,
  PRIMARY KEY (`kSLA`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspauslastung
# ------------------------------------------------------------

CREATE TABLE `tspauslastung` (
  `kSPAuslastung` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) DEFAULT NULL,
  `dAuslastungBis` date DEFAULT NULL,
  PRIMARY KEY (`kSPAuslastung`),
  UNIQUE KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspbeschwerde
# ------------------------------------------------------------

CREATE TABLE `tspbeschwerde` (
  `kBeschwerde` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) DEFAULT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) DEFAULT NULL,
  `nPrio` tinyint(4) DEFAULT NULL,
  `cTitel` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kBeschwerde`),
  KEY `kServicepartner` (`kServicepartner`),
  KEY `kAccount` (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspeinsteigerschulung
# ------------------------------------------------------------

CREATE TABLE `tspeinsteigerschulung` (
  `kServicepartner` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tsperweiterung
# ------------------------------------------------------------

CREATE TABLE `tsperweiterung` (
  `kServicepartner` int(11) NOT NULL,
  `kErweiterung` int(11) NOT NULL,
  PRIMARY KEY (`kServicepartner`,`kErweiterung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspgutschrift
# ------------------------------------------------------------

CREATE TABLE `tspgutschrift` (
  `kSPGutschrift` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) DEFAULT NULL,
  `nGutschriftsnummer` int(11) DEFAULT NULL,
  `cGutschriftsnummer` varchar(15) DEFAULT NULL,
  `cRechnungsmonat` varchar(255) DEFAULT NULL,
  `dRechnungsdatum` date DEFAULT NULL,
  `cKommentar` text,
  `cPDFDokumentPfad` varchar(255) DEFAULT NULL,
  `dPDFZugestellt` datetime DEFAULT NULL,
  `dAusgezahlt` datetime DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPGutschrift`),
  KEY `tspgutschrift_cGutschriftsnummer_index` (`cGutschriftsnummer`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspgutschriftpos
# ------------------------------------------------------------

CREATE TABLE `tspgutschriftpos` (
  `kSPGutschriftPos` int(11) NOT NULL AUTO_INCREMENT,
  `kSPGutschrift` int(11) DEFAULT NULL,
  `kSPProvMeldungProdukt` int(11) DEFAULT NULL,
  `cName` varchar(255) DEFAULT NULL,
  `fBetrag` double DEFAULT NULL,
  `fMwSt` double DEFAULT NULL,
  PRIMARY KEY (`kSPGutschriftPos`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspgutschriftposprovisionsdetail
# ------------------------------------------------------------

CREATE TABLE `tspgutschriftposprovisionsdetail` (
  `kSPGutschriftPosProvisionsdetail` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kSPGutschriftPos` int(11) DEFAULT NULL,
  `kEmpfehlungslisteBuchung` int(10) unsigned DEFAULT NULL,
  `kRechnungPos` int(10) unsigned DEFAULT NULL,
  `cRechnungsmonat` varchar(20) DEFAULT NULL,
  `fProvisionssatz` decimal(8,2) DEFAULT NULL,
  `fBetragProvision` decimal(10,2) DEFAULT NULL,
  `dRechnungBezahlt` date DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPGutschriftPosProvisionsdetail`),
  KEY `tspgutschriftposprovisionsdetail_cRechnungsmonat_index` (`cRechnungsmonat`),
  KEY `tspgutschriftposprovisionsdetail_kEmpfehlungslisteBuchung_index` (`kEmpfehlungslisteBuchung`),
  KEY `tspgutschriftposprovisionsdetail_kRechnungPos_index` (`kRechnungPos`),
  KEY `tspgutschriftposprovisionsdetail_kSPGutschriftPos_index` (`kSPGutschriftPos`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspkundensegment
# ------------------------------------------------------------

CREATE TABLE `tspkundensegment` (
  `kKundensegment` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kKundensegment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspleistung
# ------------------------------------------------------------

CREATE TABLE `tspleistung` (
  `kServicepartner` int(10) unsigned NOT NULL,
  `kLeistung` int(10) unsigned NOT NULL,
  `eType` enum('FOKUS','LEISTUNG','ERWEITERT') DEFAULT NULL,
  `cText` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kServicepartner`,`kLeistung`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tspleistungsscore
# ------------------------------------------------------------

CREATE TABLE `tspleistungsscore` (
  `kServicepartner` int(10) unsigned NOT NULL,
  `kLeistung` int(10) unsigned NOT NULL,
  `fLeistungsscore` double DEFAULT NULL,
  PRIMARY KEY (`kServicepartner`,`kLeistung`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tspnetzwerk
# ------------------------------------------------------------

CREATE TABLE `tspnetzwerk` (
  `kServicepartner` int(11) NOT NULL,
  `kZusammenarbeit` int(11) NOT NULL,
  `cText` varchar(255) DEFAULT NULL,
  `dBestaetigt` datetime DEFAULT NULL,
  `dAbgelehnt` datetime DEFAULT NULL,
  PRIMARY KEY (`kServicepartner`,`kZusammenarbeit`),
  KEY `dBestaetigt` (`dBestaetigt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tsponboarding
# ------------------------------------------------------------

CREATE TABLE `tsponboarding` (
  `kOnboarding` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kOnboarding`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprodukt
# ------------------------------------------------------------

CREATE TABLE `tspprodukt` (
  `kServicepartner` int(10) unsigned NOT NULL,
  `kProdukt` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kServicepartner`,`kProdukt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tspprojekt
# ------------------------------------------------------------

CREATE TABLE `tspprojekt` (
  `kSPProjekt` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kServicepartner` int(11) DEFAULT '0',
  `kAdminLoginFreischaltung` int(11) NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cBeschreibung` longtext NOT NULL,
  `cDatei1` varchar(255) DEFAULT NULL,
  `cDatei2` varchar(255) DEFAULT NULL,
  `cDatei3` varchar(255) DEFAULT NULL,
  `dFertigstellung` date DEFAULT NULL,
  `dBeginn` date DEFAULT NULL,
  `cProjektDauer` text,
  `nBudget` int(11) NOT NULL,
  `nZertifikatPflicht` int(11) NOT NULL,
  `nViews` int(11) DEFAULT '0',
  `nStatus` enum('0','1','2','3','10','99') DEFAULT '0',
  `dErstellt` datetime NOT NULL,
  `dAktiviert` datetime DEFAULT NULL,
  `dFeedbackMail` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPProjekt`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektangebot
# ------------------------------------------------------------

CREATE TABLE `tspprojektangebot` (
  `kSPProjektAngebot` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProjekt` int(11) NOT NULL,
  `kServicepartner` int(11) NOT NULL,
  `cNachricht` longtext NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kSPProjektAngebot`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektgroessen
# ------------------------------------------------------------

CREATE TABLE `tspprojektgroessen` (
  `kProjektgroesse` tinyint(4) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`kProjektgroesse`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspprojektjobs
# ------------------------------------------------------------

CREATE TABLE `tspprojektjobs` (
  `kJob` int(11) NOT NULL AUTO_INCREMENT,
  `cJobname` varchar(255) NOT NULL,
  `cJobOptions` text,
  `dLastrun` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`kJob`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektleistung
# ------------------------------------------------------------

CREATE TABLE `tspprojektleistung` (
  `kSPProjektleistung` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProjekt` int(11) NOT NULL,
  `kLeistung` int(11) NOT NULL,
  PRIMARY KEY (`kSPProjektleistung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektsperre
# ------------------------------------------------------------

CREATE TABLE `tspprojektsperre` (
  `kSPProjektsperre` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) NOT NULL,
  `cSperrgrund` text NOT NULL,
  `dSperreVom` datetime NOT NULL,
  `dSperreBis` datetime NOT NULL,
  PRIMARY KEY (`kSPProjektsperre`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektupload
# ------------------------------------------------------------

CREATE TABLE `tspprojektupload` (
  `kSPProjektUpload` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProjekt` int(11) NOT NULL,
  `cFilenameOriginal` varchar(255) NOT NULL,
  `cFilenameUpload` varchar(255) NOT NULL,
  `cContentType` varchar(255) NOT NULL,
  `cSession` varchar(255) NOT NULL,
  `dUpload` datetime NOT NULL,
  PRIMARY KEY (`kSPProjektUpload`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprojektview
# ------------------------------------------------------------

CREATE TABLE `tspprojektview` (
  `kSPProjektview` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProjekt` int(11) NOT NULL,
  `kServicepartner` int(11) NOT NULL,
  PRIMARY KEY (`kSPProjektview`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprovmeldung
# ------------------------------------------------------------

CREATE TABLE `tspprovmeldung` (
  `kSPProvMeldung` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) DEFAULT NULL,
  `kAccount` int(11) DEFAULT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `cKundeVorname` varchar(255) DEFAULT NULL,
  `cKundeNachname` varchar(255) DEFAULT NULL,
  `cKundeFirma` varchar(255) DEFAULT NULL,
  `cKundeStrasse` varchar(255) DEFAULT NULL,
  `cKundePLZ` varchar(10) DEFAULT NULL,
  `cKundeOrt` varchar(255) DEFAULT NULL,
  `cKundeLand` varchar(255) DEFAULT NULL,
  `cKundeEmail` varchar(255) DEFAULT NULL,
  `cKundeTel` varchar(255) DEFAULT NULL,
  `cKundeURL` varchar(255) DEFAULT NULL,
  `eStatus` enum('OFFEN','AKTIV','ABGESCHLOSSEN','KEINKUNDE','ABGELEHNT') NOT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `dGeandert` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPProvMeldung`),
  KEY `kServicepartner` (`kServicepartner`),
  KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspprovmeldungnotiz
# ------------------------------------------------------------

CREATE TABLE `tspprovmeldungnotiz` (
  `kSPProvmeldungNotiz` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProvMeldung` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `kServicepartner` int(11) NOT NULL,
  `cKommentar` longtext NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kSPProvmeldungNotiz`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspprovmeldungprodukt
# ------------------------------------------------------------

CREATE TABLE `tspprovmeldungprodukt` (
  `kSPProvMeldungProdukt` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProvMeldung` int(11) NOT NULL,
  `eProdukt` enum('Wawi-Hosting','Shop-Hosting','SQL-Hosting','JTL-eazyAuction','JTL-Search','JTL-Wawi-Repricer','JTL-Web-Repricer','JTL-WMS','JTL-Connector') NOT NULL,
  `cId` varchar(255) DEFAULT NULL,
  `cGrund` varchar(255) NOT NULL DEFAULT '',
  `nProvision` int(11) DEFAULT '0',
  `kHostingPos` int(11) DEFAULT '0',
  `kSearch` int(11) DEFAULT '0',
  `kRepricer` int(11) DEFAULT '0',
  `kUserAmaRep` int(11) DEFAULT '0',
  `kEbayKundenAccount` int(11) DEFAULT '0',
  `kAccountWMS` int(11) DEFAULT '0',
  `kConnector` int(11) DEFAULT '0',
  `eStatus` enum('OFFEN','AKTIV','AUSBEZAHLT','NICHT GEBUCHT','BEREITSVERKNUEPFT','ABGELEHNT') NOT NULL,
  `nAnderweitigVerknuepft` tinyint(4) DEFAULT NULL,
  `dErstellt` datetime NOT NULL,
  `dGeandert` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPProvMeldungProdukt`),
  KEY `kSPProvMeldung` (`kSPProvMeldung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspprovmeldungprodukthistory
# ------------------------------------------------------------

CREATE TABLE `tspprovmeldungprodukthistory` (
  `kSPProvmeldungProduktHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kSPProvMeldung` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `eProdukt` varchar(255) NOT NULL,
  `cId` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGeloescht` datetime NOT NULL,
  PRIMARY KEY (`kSPProvmeldungProduktHistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tspreferenz
# ------------------------------------------------------------

CREATE TABLE `tspreferenz` (
  `kServicepartner` int(11) NOT NULL,
  `kReferenz` int(11) NOT NULL,
  PRIMARY KEY (`kServicepartner`,`kReferenz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspschulung
# ------------------------------------------------------------

CREATE TABLE `tspschulung` (
  `kSchulung` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) NOT NULL,
  `cThema` varchar(255) NOT NULL,
  `dTermin` date NOT NULL,
  `tUhrzeit` time NOT NULL,
  `fPreis` float NOT NULL,
  `cUrl` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `nAktiv` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kSchulung`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tspstandort
# ------------------------------------------------------------

CREATE TABLE `tspstandort` (
  `kSPStandort` int(11) NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(11) NOT NULL,
  `kLand` int(11) NOT NULL,
  `cStrasse` varchar(255) CHARACTER SET latin1 NOT NULL,
  `cHausNr` varchar(50) CHARACTER SET latin1 NOT NULL,
  `cOrt` varchar(255) CHARACTER SET latin1 NOT NULL,
  `cPLZ` varchar(5) CHARACTER SET latin1 NOT NULL,
  `cAdresszusatz` varchar(255) CHARACTER SET latin1 NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `cTel` varchar(255) NOT NULL,
  `dLat` double NOT NULL DEFAULT '0',
  `dLng` double NOT NULL DEFAULT '0',
  `nAktiv` tinyint(4) NOT NULL DEFAULT '0',
  `dErstellt` datetime DEFAULT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  PRIMARY KEY (`kSPStandort`),
  KEY `kServicepartner` (`kServicepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tstammtisch
# ------------------------------------------------------------

CREATE TABLE `tstammtisch` (
  `kStammtisch` int(11) NOT NULL AUTO_INCREMENT,
  `dDatum` date NOT NULL,
  `dUhrzeit` time NOT NULL,
  `cOrt1` varchar(255) DEFAULT NULL,
  `cOrt2` varchar(255) DEFAULT NULL,
  `nAktiv` tinyint(1) DEFAULT '1',
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kStammtisch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tstammtischteilnehmer
# ------------------------------------------------------------

CREATE TABLE `tstammtischteilnehmer` (
  `kTeilnehmer` int(11) NOT NULL AUTO_INCREMENT,
  `kStammtisch` int(11) DEFAULT NULL,
  `cAnrede` varchar(255) DEFAULT NULL,
  `cVorname` varchar(255) DEFAULT NULL,
  `cNachname` varchar(255) DEFAULT NULL,
  `cFirma` varchar(255) DEFAULT NULL,
  `cMail` varchar(255) DEFAULT NULL,
  `cKommentar` text,
  `nAktiv` tinyint(1) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  PRIMARY KEY (`kTeilnehmer`),
  KEY `kStammtisch` (`kStammtisch`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tstatistik
# ------------------------------------------------------------

CREATE TABLE `tstatistik` (
  `kStatistik` int(11) NOT NULL AUTO_INCREMENT,
  `cBereich` varchar(50) NOT NULL,
  `cDaten` varchar(50) NOT NULL,
  `nJahr` int(11) DEFAULT NULL,
  `cJSON` text NOT NULL,
  `dUpdated` datetime NOT NULL,
  PRIMARY KEY (`kStatistik`),
  KEY `cTyp` (`cBereich`),
  KEY `cBereich` (`cDaten`),
  KEY `nJahr` (`nJahr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tstoerungblacklist
# ------------------------------------------------------------

CREATE TABLE `tstoerungblacklist` (
  `kAccount` int(11) NOT NULL,
  UNIQUE KEY `kAccount` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tsubscription
# ------------------------------------------------------------

CREATE TABLE `tsubscription` (
  `kSubscription` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kLizenz` int(10) unsigned NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `cAdminuser` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGueltigBis` date NOT NULL,
  PRIMARY KEY (`kSubscription`),
  KEY `kLizenz` (`kLizenz`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tsubscriptionmail
# ------------------------------------------------------------

CREATE TABLE `tsubscriptionmail` (
  `kSubscriptionmail` int(11) NOT NULL AUTO_INCREMENT,
  `kLizenz` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `dZuletztVersendet` datetime NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kSubscriptionmail`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupport
# ------------------------------------------------------------

CREATE TABLE `tsupport` (
  `kSupport` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) unsigned NOT NULL,
  `kSupportLeistung` int(10) unsigned NOT NULL,
  `nLevel` tinyint(3) unsigned NOT NULL,
  `dGueltigBis` datetime NOT NULL,
  `dGueltigAb` datetime NOT NULL,
  PRIMARY KEY (`kSupport`),
  KEY `kAccount` (`kAccount`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tsupportanfragen
# ------------------------------------------------------------

CREATE TABLE `tsupportanfragen` (
  `kSupportAnfragen` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `cTicketNr` varchar(50) NOT NULL DEFAULT '0',
  `cTicketID` int(11) DEFAULT NULL,
  `cSubject` varchar(255) NOT NULL,
  `cMessage` longtext NOT NULL,
  `dErstellt` datetime NOT NULL,
  PRIMARY KEY (`kSupportAnfragen`),
  UNIQUE KEY `cTicketID` (`cTicketID`),
  KEY `cTicketNr` (`cTicketNr`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcase
# ------------------------------------------------------------

CREATE TABLE `tsupportcase` (
  `kSupportcase` bigint(20) NOT NULL AUTO_INCREMENT,
  `kSupportcaseQuelle` int(11) NOT NULL,
  `kSupportcaseAnliegen` int(11) NOT NULL,
  `kSupportcaseStatus` int(11) NOT NULL,
  `kSupportcaseWikiEintrag` int(11) NOT NULL,
  `kKunde` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `kErsteller` int(11) NOT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cAnsprechpartner` varchar(255) NOT NULL,
  `cTelefon` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cOtrsTicket` varchar(255) NOT NULL,
  `cCaseTitel` text NOT NULL,
  `cCaseNotiz` longtext NOT NULL,
  `cCaseLoesung` longtext NOT NULL,
  `cDevTicket` varchar(255) NOT NULL,
  `cForenlink` text NOT NULL,
  `cArbeiten` longtext NOT NULL,
  `cKundenfreundlichkeitText` longtext NOT NULL,
  `cWikilink` text NOT NULL,
  `bTeamviewer` enum('1','0') DEFAULT '0',
  `bEntwicklerHilfe` enum('1','0') DEFAULT '0',
  `bKostenpflichtig` enum('1','0') DEFAULT '0',
  `bPremium` enum('0','1') NOT NULL DEFAULT '0',
  `bWmsPremium` int(11) NOT NULL,
  `nSchwierigkeitsgrad` int(11) NOT NULL,
  `nKundenfreundlichkeit` int(11) NOT NULL,
  `nDauer` int(11) NOT NULL,
  `nPreis` float NOT NULL,
  `nMitarbeiter` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dWiedervorlage` datetime NOT NULL,
  `dGeschlossen` datetime NOT NULL,
  PRIMARY KEY (`kSupportcase`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseanliegen
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseanliegen` (
  `kSupportcaseAnliegen` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcaseAnliegen`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasebereichmissing
# ------------------------------------------------------------

CREATE TABLE `tsupportcasebereichmissing` (
  `kSupportcase` int(11) NOT NULL,
  `kSupportcaseProdukt` int(11) NOT NULL,
  `cText` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasebereichmissinghistory
# ------------------------------------------------------------

CREATE TABLE `tsupportcasebereichmissinghistory` (
  `kSupportcaseHistory` int(11) NOT NULL,
  `kSupportcaseProdukt` int(11) NOT NULL,
  `cText` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasedevstatus
# ------------------------------------------------------------

CREATE TABLE `tsupportcasedevstatus` (
  `kSupportcaseDevStatus` int(11) NOT NULL AUTO_INCREMENT,
  `kSupportcase` int(11) NOT NULL,
  `kDevTicketID` int(11) NOT NULL,
  `cDevStatus` varchar(255) NOT NULL,
  `cFixedVersion` varchar(255) NOT NULL,
  `dZuletztGeprueft` datetime NOT NULL,
  `dAbgeschlossen` datetime NOT NULL,
  PRIMARY KEY (`kSupportcaseDevStatus`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasehistory
# ------------------------------------------------------------

CREATE TABLE `tsupportcasehistory` (
  `kSupportcaseHistory` bigint(20) NOT NULL AUTO_INCREMENT,
  `kSupportcase` bigint(20) NOT NULL,
  `kSupportcaseQuelle` int(11) NOT NULL,
  `kSupportcaseAnliegen` int(11) NOT NULL,
  `kSupportcaseStatus` int(11) NOT NULL,
  `kSupportcaseWikiEintrag` int(11) NOT NULL,
  `kKunde` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `kErsteller` int(11) NOT NULL,
  `kAdminloginChanged` int(11) NOT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cAnsprechpartner` varchar(255) NOT NULL,
  `cTelefon` varchar(255) NOT NULL,
  `cEmail` varchar(255) NOT NULL,
  `cOtrsTicket` varchar(255) NOT NULL,
  `cCaseTitel` text NOT NULL,
  `cCaseNotiz` longtext NOT NULL,
  `cCaseLoesung` longtext NOT NULL,
  `cDevTicket` varchar(255) NOT NULL,
  `cForenlink` text NOT NULL,
  `cArbeiten` longtext NOT NULL,
  `cKundenfreundlichkeitText` longtext NOT NULL,
  `cWikilink` text NOT NULL,
  `bTeamviewer` enum('1','0') DEFAULT '0',
  `bEntwicklerHilfe` enum('1','0') DEFAULT '0',
  `bKostenpflichtig` enum('1','0') DEFAULT '0',
  `bPremium` enum('0','1') NOT NULL DEFAULT '0',
  `bWmsPremium` int(11) NOT NULL,
  `nSchwierigkeitsgrad` int(11) NOT NULL,
  `nKundenfreundlichkeit` int(11) NOT NULL,
  `nDauer` int(11) NOT NULL,
  `nPreis` float NOT NULL,
  `nMitarbeiter` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGeaendert` datetime NOT NULL,
  `dWiedervorlage` datetime NOT NULL,
  `dGeschlossen` datetime NOT NULL,
  PRIMARY KEY (`kSupportcaseHistory`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseprodukt
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseprodukt` (
  `kSupportcaseProdukt` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcaseProdukt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseproduktbereich
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseproduktbereich` (
  `kSupportcaseProduktBereich` int(11) NOT NULL AUTO_INCREMENT,
  `kSupportcaseProdukt` int(11) NOT NULL,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcaseProduktBereich`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseproduktbereichrelation
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseproduktbereichrelation` (
  `kSupportcase` bigint(20) NOT NULL,
  `kSupportcaseProduktBereich` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseproduktbereichrelationhistory
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseproduktbereichrelationhistory` (
  `kSupportcaseHistory` bigint(20) NOT NULL,
  `kSupportcaseProduktBereich` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseproduktrelation
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseproduktrelation` (
  `kSupportcase` bigint(20) NOT NULL,
  `kSupportcaseProdukt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcaseproduktrelationhistory
# ------------------------------------------------------------

CREATE TABLE `tsupportcaseproduktrelationhistory` (
  `kSupportcaseHistory` bigint(20) NOT NULL,
  `kSupportcaseProdukt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasequelle
# ------------------------------------------------------------

CREATE TABLE `tsupportcasequelle` (
  `kSupportcaseQuelle` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcaseQuelle`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasestatus
# ------------------------------------------------------------

CREATE TABLE `tsupportcasestatus` (
  `kSupportcasestatus` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcasestatus`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportcasewikieintrag
# ------------------------------------------------------------

CREATE TABLE `tsupportcasewikieintrag` (
  `kSupportcaseWikiEintrag` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kSupportcaseWikiEintrag`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump tsupportleistung
# ------------------------------------------------------------

CREATE TABLE `tsupportleistung` (
  `kSupportLeistung` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) DEFAULT NULL,
  `cInfo` text,
  `nLevel` int(11) NOT NULL,
  PRIMARY KEY (`kSupportLeistung`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump ttag
# ------------------------------------------------------------

CREATE TABLE `ttag` (
  `kTag` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cNameIntern` varchar(50) DEFAULT NULL,
  `cName` varchar(50) DEFAULT NULL,
  `cFarbe` varchar(30) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`kTag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttaggruppe
# ------------------------------------------------------------

CREATE TABLE `ttaggruppe` (
  `kTagGruppe` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cNameIntern` varchar(50) DEFAULT NULL,
  `cName` varchar(50) DEFAULT NULL,
  `dErstellt` datetime DEFAULT NULL,
  `nSort` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`kTagGruppe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttaggruppetag
# ------------------------------------------------------------

CREATE TABLE `ttaggruppetag` (
  `kTagGruppeTag` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kTagGruppe` int(10) unsigned DEFAULT NULL,
  `kTag` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`kTagGruppeTag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttechnologiepartner
# ------------------------------------------------------------

CREATE TABLE `ttechnologiepartner` (
  `kTechnologiepartner` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `eKategorie` enum('','Zahlungsanbieter','Versand','Sicherheit-und-Recht','Marketing','Softwarepartner','Hostingpartner') NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cKurzbeschreibung` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  `cMetaTitle` varchar(55) DEFAULT NULL,
  `cMetaDesc` varchar(156) DEFAULT NULL,
  `cLogo` varchar(255) DEFAULT NULL,
  `cVideoLink` varchar(255) DEFAULT NULL,
  `cLogoMaterialLink` varchar(255) DEFAULT NULL,
  `eStatus` enum('OFFEN','AKTION','FREIGESCHALTET','GEKUENDIGT') DEFAULT NULL,
  `nLandingpage` tinyint(4) DEFAULT NULL COMMENT '0 = deaktiviert, 1 = aktiviert',
  `dErstellt` datetime DEFAULT NULL,
  `dFreigabe` datetime DEFAULT NULL,
  `dAenderung` datetime DEFAULT NULL,
  `nSort` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kTechnologiepartner`),
  KEY `nSort` (`nSort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `ttechnologiepartnerafterupdate` AFTER UPDATE ON `ttechnologiepartner` FOR EACH ROW BEGIN
	INSERT INTO ttechnologiepartnerhistory SET kTechnologiepartner = NEW.kTechnologiepartner, kAdminlogin = NEW.kTechnologiepartner, cName = NEW.cName, cKurzbeschreibung = NEW.cKurzbeschreibung, cBeschreibung = NEW.cBeschreibung, cLogo = NEW.cLogo, cVideoLink = NEW.cVideoLink, cLogoMaterialLink = NEW.cLogoMaterialLink, eStatus = NEW.eStatus, nLandingpage = NEW.nLandingpage, dErstellt = NEW.dErstellt, dFreigabe = NEW.dFreigabe, dAenderung = NEW.dAenderung;
END */;;
DELIMITER ;


# Tabellen-Dump ttechnologiepartneraenderung
# ------------------------------------------------------------

CREATE TABLE `ttechnologiepartneraenderung` (
  `kTechnologiepartnerAenderung` int(11) NOT NULL AUTO_INCREMENT,
  `kTechnologiepartner` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `eKategorie` enum('','Zahlungsanbieter','Versand','Sicherheit-und-Recht','Marketing','Softwarepartner','Hostingpartner') NOT NULL,
  `cName` varchar(255) NOT NULL,
  `cKurzbeschreibung` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cLogo` varchar(255) DEFAULT NULL,
  `dAenderung` datetime NOT NULL,
  PRIMARY KEY (`kTechnologiepartnerAenderung`),
  UNIQUE KEY `kTechnologiepartner` (`kTechnologiepartner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttechnologiepartnerhistory
# ------------------------------------------------------------

CREATE TABLE `ttechnologiepartnerhistory` (
  `kTechnologiepartnerHistory` int(11) NOT NULL AUTO_INCREMENT,
  `kTechnologiepartner` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL DEFAULT '0',
  `eKategorie` enum('','Zahlungsanbieter','Versand','Sicherheit-und-Recht','Marketing','Softwarepartner','Hostingpartner') NOT NULL,
  `cName` varchar(255) NOT NULL DEFAULT '0',
  `cKurzbeschreibung` varchar(255) DEFAULT NULL,
  `cBeschreibung` text,
  `cLogo` varchar(255) DEFAULT NULL,
  `cVideoLink` varchar(255) DEFAULT NULL,
  `cLogoMaterialLink` varchar(255) DEFAULT NULL,
  `eStatus` enum('OFFEN','AKTION','FREIGESCHALTET','GEKUENDIGT') DEFAULT NULL,
  `nLandingpage` tinyint(4) DEFAULT NULL COMMENT '0 = deaktiviert, 1 = aktiviert',
  `dErstellt` datetime DEFAULT NULL,
  `dFreigabe` datetime DEFAULT NULL,
  `dAenderung` datetime DEFAULT NULL,
  PRIMARY KEY (`kTechnologiepartnerHistory`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttechnologiepartnerkategorie
# ------------------------------------------------------------

CREATE TABLE `ttechnologiepartnerkategorie` (
  `kTechnologiepartnerKategorie` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kTechnologiepartnerKategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttechnologiepartnerkategorierel
# ------------------------------------------------------------

CREATE TABLE `ttechnologiepartnerkategorierel` (
  `kTechnologiepartnerKategorieRel` int(11) NOT NULL AUTO_INCREMENT,
  `kTechnologiepartner` int(11) NOT NULL,
  `kTechnologiepartnerKategorie` int(11) NOT NULL,
  PRIMARY KEY (`kTechnologiepartnerKategorieRel`),
  KEY `kTechnologiepartner` (`kTechnologiepartner`),
  KEY `kTechnologiepartnerKategorie` (`kTechnologiepartnerKategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tteilzahlungen
# ------------------------------------------------------------

CREATE TABLE `tteilzahlungen` (
  `kTeilzahlung` int(11) NOT NULL AUTO_INCREMENT,
  `kRechnung` int(11) NOT NULL,
  `kRechnungskorrektur` int(11) DEFAULT NULL,
  `kAccount` int(11) NOT NULL,
  `kAdminLogin` int(11) NOT NULL,
  `fBetrag` float(10,2) NOT NULL,
  `dEingetragen` datetime NOT NULL,
  PRIMARY KEY (`kTeilzahlung`),
  KEY `kRechnung` (`kRechnung`),
  KEY `kAccount` (`kAccount`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump ttestbarershop
# ------------------------------------------------------------

CREATE TABLE `ttestbarershop` (
  `kShop` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cURL` varchar(255) NOT NULL,
  `nSort` int(11) NOT NULL,
  PRIMARY KEY (`kShop`),
  KEY `nSort` (`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump ttestsqlaccounts
# ------------------------------------------------------------

CREATE TABLE `ttestsqlaccounts` (
  `id` int(13) NOT NULL AUTO_INCREMENT,
  `vorname` char(150) DEFAULT NULL,
  `nachname` char(150) DEFAULT NULL,
  `anrede` set('Herr','Frau') DEFAULT NULL,
  `firma` char(150) DEFAULT NULL,
  `email` char(200) DEFAULT NULL,
  `nachricht` text,
  `status` set('AKTIV','OFFEN','GELOESCHT','ABGELAUFEN','INLOESCHUNG') DEFAULT 'OFFEN',
  `serverid` int(13) DEFAULT NULL,
  `instanzid` char(50) NOT NULL,
  `sapass` char(50) DEFAULT NULL,
  `port` varchar(255) DEFAULT NULL,
  `instanzuser` char(50) DEFAULT NULL,
  `instanzpass` char(50) DEFAULT NULL,
  `erstellt` datetime DEFAULT CURRENT_TIMESTAMP,
  `ablauf` datetime DEFAULT NULL,
  `verlaengert` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



# Tabellen-Dump ttrackandtracetarifbuchungen
# ------------------------------------------------------------

CREATE TABLE `ttrackandtracetarifbuchungen` (
  `kBuchung` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kTarif` int(11) NOT NULL,
  `bActive` tinyint(4) NOT NULL DEFAULT '1',
  `fKosten` float DEFAULT '0',
  `dGebuchtAm` datetime NOT NULL,
  `dGueltigAb` datetime DEFAULT NULL,
  `dGekuendigtZum` datetime DEFAULT NULL,
  `cGekuendigtDurch` char(120) DEFAULT NULL,
  `kBuchungNeu` bigint(11) DEFAULT NULL,
  PRIMARY KEY (`kBuchung`),
  KEY `ttbuchungen_kAccount_dGueltigAb_dGekuendigtZum_index` (`kAccount`,`dGueltigAb`,`dGekuendigtZum`),
  KEY `ttbuchungen_kBuchung_kBuchung_kBuchung_index` (`kAccount`,`dGueltigAb`,`dGekuendigtZum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump ttrackandtracetarife
# ------------------------------------------------------------

CREATE TABLE `ttrackandtracetarife` (
  `kTarif` int(11) NOT NULL AUTO_INCREMENT,
  `cTarifname` varchar(250) DEFAULT NULL,
  `nBuchbar` int(11) DEFAULT NULL,
  `nSort` int(11) NOT NULL,
  `fKostenMonat` float(10,2) DEFAULT NULL,
  `fKostenPakete` float(10,2) NOT NULL,
  `nPaketeInkl` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kTarif`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tversandvolumen
# ------------------------------------------------------------

CREATE TABLE `tversandvolumen` (
  `kVersandvolumen` tinyint(4) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `nSort` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`kVersandvolumen`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tverteiler
# ------------------------------------------------------------

CREATE TABLE `tverteiler` (
  `kVerteiler` int(10) NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) NOT NULL,
  `cRolle` varchar(255) NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `dGeaendert` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `dErstellt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`kVerteiler`),
  KEY `kAccount_idx` (`kAccount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvertriebcase
# ------------------------------------------------------------

CREATE TABLE `tvertriebcase` (
  `kVertriebcase` int(11) NOT NULL AUTO_INCREMENT,
  `kErsteller` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kBearbeiter` int(11) NOT NULL,
  `kAdminBenutzergruppe` int(11) NOT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cTel` varchar(255) NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `cStrasse` varchar(255) NOT NULL,
  `cPLZ` varchar(255) NOT NULL,
  `cOrt` varchar(255) NOT NULL,
  `cLand` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cKommentar` text NOT NULL,
  `cOtrsTicket` varchar(255) NOT NULL,
  `nAnzahlMitarbeiter` int(11) NOT NULL,
  `nAnzahlMitarbeiterLager` int(11) NOT NULL,
  `nBestellungenProMonat` int(11) NOT NULL,
  `nArtikelImSortiment` int(11) NOT NULL,
  `nLagerflaeche` int(11) NOT NULL,
  `nEbayAccounts` int(11) NOT NULL,
  `nAmazonAccounts` int(11) NOT NULL,
  `eStatus` enum('offen','in Bearbeitung','Wiedervorlage','geschlossen') NOT NULL DEFAULT 'offen',
  `dErstellt` datetime NOT NULL,
  `dWiedervorlage` date NOT NULL,
  `nHerkunft` tinyint(4) NOT NULL DEFAULT '0',
  `nAufmerksam` tinyint(4) NOT NULL DEFAULT '0',
  `kB2B` tinyint(4) NOT NULL DEFAULT '0',
  `kBranche` tinyint(4) NOT NULL DEFAULT '0',
  `dZuletztbearbeitet` datetime NOT NULL,
  `cWWW` varchar(255) NOT NULL,
  `kServicepartner` int(11) NOT NULL DEFAULT '0',
  `nServicepartnerZufriedenheit` tinyint(4) NOT NULL DEFAULT '0',
  `cServicepartnerZufriedenheitBegruendung` text NOT NULL,
  PRIMARY KEY (`kVertriebcase`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `tvertriebcaseOnUpdate` BEFORE UPDATE ON `tvertriebcase` FOR EACH ROW BEGIN
    INSERT INTO tvertriebcasehistory SET 
    kVertriebcase = OLD.kVertriebcase, 
    kErsteller = OLD.kErsteller,
    kAccount = OLD.kAccount,
    kBearbeiter = OLD.kBearbeiter,
    kAdminBenutzergruppe = OLD.kAdminBenutzergruppe,
    cVorname = OLD.cVorname,
    cNachname = OLD.cNachname,
    cFirma = OLD.cFirma,
    cTel = OLD.cTel,
    cMail = OLD.cMail,
    cStrasse = OLD.cStrasse,
    cPLZ = OLD.cPLZ,
    cOrt = OLD.cOrt,
    cLand = OLD.cLand,
    cBeschreibung = OLD.cBeschreibung,
    cKommentar = OLD.cKommentar,
    nAnzahlMitarbeiter = OLD.nAnzahlMitarbeiter,
    nAnzahlMitarbeiterLager = OLD.nAnzahlMitarbeiterLager,
    nBestellungenProMonat = OLD.nBestellungenProMonat,
    nArtikelImSortiment = OLD.nArtikelImSortiment,
    nLagerflaeche = OLD.nLagerflaeche,
    nEbayAccounts = OLD.nEbayAccounts,
    nAmazonAccounts = OLD.nAmazonAccounts,
    eStatus = OLD.eStatus,
    dErstellt = OLD.dErstellt,
    dWiedervorlage = OLD.dWiedervorlage,
    dZuletztBearbeitet = OLD.dZuletztBearbeitet,
    dHistoryEintrag = now();
END */;;
DELIMITER ;


# Tabellen-Dump tvertriebcasealteprodukte
# ------------------------------------------------------------

CREATE TABLE `tvertriebcasealteprodukte` (
  `kVertriebcasealteprodukte` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcaseproduktekategorie` int(11) NOT NULL,
  `cProduktname` varchar(255) NOT NULL,
  PRIMARY KEY (`kVertriebcasealteprodukte`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcasealteprodukterelation
# ------------------------------------------------------------

CREATE TABLE `tvertriebcasealteprodukterelation` (
  `kVertriebcasealteprodukterelation` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcase` int(11) NOT NULL,
  `kVertriebcasealteprodukte` int(11) NOT NULL,
  PRIMARY KEY (`kVertriebcasealteprodukterelation`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseaufmerksam
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseaufmerksam` (
  `kAufmerksam` int(11) NOT NULL AUTO_INCREMENT,
  `cAufmerksam` varchar(255) NOT NULL,
  PRIMARY KEY (`kAufmerksam`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvertriebcaseb2b
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseb2b` (
  `kB2B` int(11) NOT NULL AUTO_INCREMENT,
  `cB2B` varchar(255) NOT NULL,
  PRIMARY KEY (`kB2B`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvertriebcasebranche
# ------------------------------------------------------------

CREATE TABLE `tvertriebcasebranche` (
  `kBranche` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  PRIMARY KEY (`kBranche`),
  KEY `cName` (`cName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvertriebcaseherkunft
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseherkunft` (
  `kHerkunft` int(11) NOT NULL AUTO_INCREMENT,
  `cHerkunft` varchar(255) NOT NULL,
  PRIMARY KEY (`kHerkunft`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvertriebcasehistory
# ------------------------------------------------------------

CREATE TABLE `tvertriebcasehistory` (
  `kVertriebcasehistory` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcase` int(11) NOT NULL,
  `kErsteller` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kBearbeiter` int(11) NOT NULL,
  `kAdminBenutzergruppe` int(11) NOT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cFirma` varchar(255) NOT NULL,
  `cTel` varchar(255) NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `cStrasse` varchar(255) NOT NULL,
  `cPLZ` varchar(255) NOT NULL,
  `cOrt` varchar(255) NOT NULL,
  `cLand` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cKommentar` text NOT NULL,
  `nAnzahlMitarbeiter` int(11) NOT NULL,
  `nAnzahlMitarbeiterLager` int(11) NOT NULL,
  `nBestellungenProMonat` int(11) NOT NULL,
  `nArtikelImSortiment` int(11) NOT NULL,
  `nLagerflaeche` int(11) NOT NULL,
  `nEbayAccounts` int(11) NOT NULL,
  `nAmazonAccounts` int(11) NOT NULL,
  `eStatus` enum('offen','in Bearbeitung','Wiedervorlage','geschlossen') NOT NULL DEFAULT 'offen',
  `dErstellt` datetime NOT NULL,
  `dWiedervorlage` date NOT NULL,
  `dZuletztbearbeitet` datetime NOT NULL,
  `dHistoryEintrag` datetime NOT NULL,
  PRIMARY KEY (`kVertriebcasehistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseprodukt
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseprodukt` (
  `kVertriebcaseprodukt` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcaseproduktekategorie` int(11) NOT NULL,
  `cProduktname` varchar(255) NOT NULL,
  PRIMARY KEY (`kVertriebcaseprodukt`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseproduktanforderungen
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseproduktanforderungen` (
  `kVertriebcaseproduktanforderungen` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcaseproduktrelation` int(11) NOT NULL,
  `cAnforderung` text NOT NULL,
  `cWichtigkeit` varchar(255) NOT NULL,
  `bDone` int(11) NOT NULL,
  `kBenutzerMarkedDone` int(11) NOT NULL,
  `dMarkedDone` datetime NOT NULL,
  PRIMARY KEY (`kVertriebcaseproduktanforderungen`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseproduktekategorie
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseproduktekategorie` (
  `kVertriebcaseproduktekategorie` int(11) NOT NULL AUTO_INCREMENT,
  `cKategoriename` varchar(255) NOT NULL,
  PRIMARY KEY (`kVertriebcaseproduktekategorie`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseproduktrelation
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseproduktrelation` (
  `kVertriebcaseproduktrelation` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcase` int(11) NOT NULL,
  `kVertriebcaseprodukt` int(11) NOT NULL,
  `kVertriebcaseStatus` int(11) NOT NULL,
  `cAnderesProdukt` text NOT NULL,
  `cKommentar` text NOT NULL,
  PRIMARY KEY (`kVertriebcaseproduktrelation`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`kc_typo3_user`@`localhost` */ /*!50003 TRIGGER `tvertriebcaseproduktrelationOnUpdate` BEFORE UPDATE ON `tvertriebcaseproduktrelation` FOR EACH ROW BEGIN
    INSERT INTO tvertriebcaseproduktrelationhistory SET kVertriebcase = OLD.kVertriebcase, kVertriebcaseprodukt = OLD.kVertriebcaseprodukt, kVertriebcaseStatus = OLD.kVertriebcaseStatus, cAnderesProdukt = OLD.cAnderesProdukt, cKommentar = OLD.cKommentar, dHistoryEintrag = now();
END */;;
DELIMITER ;


# Tabellen-Dump tvertriebcaseproduktrelationhistory
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseproduktrelationhistory` (
  `kVertriebcaseproduktrelationhistory` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcaseproduktrelation` int(11) NOT NULL,
  `kVertriebcase` int(11) NOT NULL,
  `kVertriebcaseprodukt` int(11) NOT NULL,
  `kVertriebcaseStatus` int(11) NOT NULL,
  `cAnderesProdukt` text NOT NULL,
  `cKommentar` text NOT NULL,
  `dHistoryEintrag` datetime NOT NULL,
  PRIMARY KEY (`kVertriebcaseproduktrelationhistory`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseproduktstatus
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseproduktstatus` (
  `kVertriebcaseProduktstatus` int(11) NOT NULL AUTO_INCREMENT,
  `cStatusname` varchar(255) NOT NULL,
  PRIMARY KEY (`kVertriebcaseProduktstatus`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcasesonstigealteprodukte
# ------------------------------------------------------------

CREATE TABLE `tvertriebcasesonstigealteprodukte` (
  `kVertriebcasesonstigealteprodukte` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcase` int(11) NOT NULL,
  `kVertriebcaseproduktekategorie` int(11) NOT NULL,
  `cProduktname` varchar(255) NOT NULL,
  PRIMARY KEY (`kVertriebcasesonstigealteprodukte`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvertriebcaseverlauf
# ------------------------------------------------------------

CREATE TABLE `tvertriebcaseverlauf` (
  `kVertriebcaseverlauf` int(11) NOT NULL AUTO_INCREMENT,
  `kVertriebcase` int(11) NOT NULL,
  `kVertriebcaseprodukt` int(11) NOT NULL,
  `kAdminlogin` int(11) NOT NULL,
  `cTaetigkeit` text NOT NULL,
  `cTaetigkeitNext` text NOT NULL,
  `dEingetragen` datetime NOT NULL,
  PRIMARY KEY (`kVertriebcaseverlauf`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tvoplaender
# ------------------------------------------------------------

CREATE TABLE `tvoplaender` (
  `cLand` varchar(255) CHARACTER SET latin1 NOT NULL,
  PRIMARY KEY (`cLand`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvorlage
# ------------------------------------------------------------

CREATE TABLE `tvorlage` (
  `kVorlage` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kLastEditor` int(11) DEFAULT NULL,
  `kHeaderVorlage` int(11) DEFAULT NULL,
  `kFooterVorlage` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `cBetreff` varchar(255) NOT NULL,
  `cSalutationText` text,
  `cText` text NOT NULL,
  `cSalutationHTML` text,
  `cHTML` text NOT NULL,
  `cAdditionalText` text,
  `cAdditionalHTML` text,
  `cBannerText` text,
  `cBannerHTML` text,
  `cFooterText` text,
  `cFooterHTML` text,
  `nAktiv` tinyint(4) NOT NULL DEFAULT '1',
  `nIntern` tinyint(4) NOT NULL DEFAULT '0',
  `cNote` text,
  `dUpdated` int(10) NOT NULL,
  PRIMARY KEY (`kVorlage`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tvorlage_kategorie
# ------------------------------------------------------------

CREATE TABLE `tvorlage_kategorie` (
  `kVorlage` int(11) NOT NULL,
  `kKategorie` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvorlagenkategoriegruppen
# ------------------------------------------------------------

CREATE TABLE `tvorlagenkategoriegruppen` (
  `kVorlagenkategoriegruppe` int(11) NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `nSort` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`kVorlagenkategoriegruppe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tvorlagenkategorien
# ------------------------------------------------------------

CREATE TABLE `tvorlagenkategorien` (
  `kKategorie` int(11) NOT NULL AUTO_INCREMENT,
  `kVorlagenkategoriegruppe` int(11) NOT NULL,
  `cName` varchar(255) NOT NULL,
  `nSort` int(11) NOT NULL DEFAULT '10000',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`kKategorie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump twarenwirtschaft
# ------------------------------------------------------------

CREATE TABLE `twarenwirtschaft` (
  `kWarenwirtschaft` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cName` varchar(255) NOT NULL,
  `cURL` varchar(255) NOT NULL,
  `nSort` int(11) NOT NULL,
  PRIMARY KEY (`kWarenwirtschaft`),
  KEY `nSort` (`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump twawicluster
# ------------------------------------------------------------

CREATE TABLE `twawicluster` (
  `kclid` int(13) NOT NULL AUTO_INCREMENT,
  `kcl` char(40) CHARACTER SET latin1 DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`kclid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump twawiclusternodes
# ------------------------------------------------------------

CREATE TABLE `twawiclusternodes` (
  `knid` int(13) NOT NULL AUTO_INCREMENT,
  `cNodeHost` char(40) CHARACTER SET latin1 DEFAULT NULL,
  `kclid` int(13) NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`knid`),
  KEY `kclid` (`kclid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump twawipackages
# ------------------------------------------------------------

CREATE TABLE `twawipackages` (
  `kpid` int(13) NOT NULL AUTO_INCREMENT,
  `kProduktLeistung` int(13) NOT NULL DEFAULT '0',
  `cPackage` char(100) CHARACTER SET latin1 DEFAULT NULL,
  `memory` int(12) NOT NULL DEFAULT '0',
  `cores` int(4) NOT NULL DEFAULT '0',
  `sockets` int(4) NOT NULL DEFAULT '0',
  `hdd` int(20) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`kpid`),
  KEY `kProduktLeistung` (`kProduktLeistung`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump twawirepricerhistory
# ------------------------------------------------------------

CREATE TABLE `twawirepricerhistory` (
  `kWawiRepricerHistory` int(10) NOT NULL AUTO_INCREMENT,
  `kAccount` int(10) NOT NULL,
  `kUser` int(10) NOT NULL,
  `kAdminlogin` int(10) NOT NULL,
  `cMode` varchar(255) NOT NULL,
  `cExecutionPerson` varchar(255) NOT NULL,
  `dChanged` datetime NOT NULL,
  PRIMARY KEY (`kWawiRepricerHistory`),
  KEY `kAccount` (`kAccount`,`kUser`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump twawirepricerkuendigung
# ------------------------------------------------------------

CREATE TABLE `twawirepricerkuendigung` (
  `kUser` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `dKuendigungZum` date DEFAULT NULL,
  `dKuendigungAm` datetime DEFAULT NULL,
  `kAdminlogin` int(11) DEFAULT '0',
  PRIMARY KEY (`kUser`),
  KEY `kAccount` (`kAccount`),
  KEY `kAdminlogin` (`kAdminlogin`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump twiedervorlage
# ------------------------------------------------------------

CREATE TABLE `twiedervorlage` (
  `kWiedervorlage` int(11) NOT NULL AUTO_INCREMENT,
  `kAdminUser` int(11) NOT NULL,
  `kAssignedTo` int(11) NOT NULL,
  `kAccount` int(11) NOT NULL,
  `kGruppenfreigabe` int(11) NOT NULL,
  `kWiedervorlageReason` int(11) DEFAULT NULL,
  `cGrund` longtext NOT NULL,
  `cKommentar` longtext NOT NULL,
  `dWiedervorlage` date NOT NULL,
  `dErstellt` date NOT NULL,
  `dAktualisiert` datetime DEFAULT NULL,
  PRIMARY KEY (`kWiedervorlage`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump twiedervorlage_reasons
# ------------------------------------------------------------

CREATE TABLE `twiedervorlage_reasons` (
  `kWiedervorlageReason` int(11) NOT NULL AUTO_INCREMENT,
  `cText` text NOT NULL,
  `bHidden` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`kWiedervorlageReason`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump twiedervorlagegruppenfreigabe
# ------------------------------------------------------------

CREATE TABLE `twiedervorlagegruppenfreigabe` (
  `kWiedervorlage` int(11) NOT NULL,
  `kGruppe` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tzeitlizenz
# ------------------------------------------------------------

CREATE TABLE `tzeitlizenz` (
  `kZeitLizenz` int(11) NOT NULL AUTO_INCREMENT,
  `kAccount` int(11) NOT NULL,
  `kLizenz` int(11) NOT NULL,
  `kShopModul` int(11) NOT NULL,
  `kKaufProdukt` int(11) NOT NULL,
  `kAccountGebunden` int(11) NOT NULL,
  `kShop` int(11) NOT NULL,
  `cLizenzkey` varchar(255) NOT NULL,
  `nAbgelaufen` int(11) NOT NULL,
  `nUmgewandelt` int(11) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dLetzteErinnerung` datetime NOT NULL,
  `dGueltigBis` datetime NOT NULL,
  PRIMARY KEY (`kZeitLizenz`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tzertifikat
# ------------------------------------------------------------

CREATE TABLE `tzertifikat` (
  `kZertifikat` int(10) NOT NULL AUTO_INCREMENT,
  `kProdukt` int(10) DEFAULT NULL,
  `cName` varchar(255) NOT NULL,
  `cZertifizierung` varchar(255) NOT NULL,
  `cVorraussetzung` varchar(255) NOT NULL,
  `cBeschreibung` text NOT NULL,
  `cBildPfad` varchar(255) NOT NULL,
  `cHTML` text NOT NULL,
  `nSort` int(11) NOT NULL DEFAULT '0',
  `fPreis` double NOT NULL,
  `nAktiv` tinyint(4) NOT NULL,
  PRIMARY KEY (`kZertifikat`),
  KEY `cName` (`cName`),
  KEY `nSort` (`nSort`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tzertifikatanfrage
# ------------------------------------------------------------

CREATE TABLE `tzertifikatanfrage` (
  `kZertifikatanfrage` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kServicepartner` int(10) unsigned NOT NULL DEFAULT '0',
  `kTechnologiepartner` int(10) NOT NULL DEFAULT '0',
  `kAnsprechpartner` int(10) unsigned NOT NULL,
  `kErweiterung` int(10) NOT NULL,
  `cNotiz` text CHARACTER SET utf8 NOT NULL,
  `cDatei` varchar(255) CHARACTER SET utf8 NOT NULL,
  `nStatus` int(1) unsigned NOT NULL DEFAULT '0',
  `dEingang` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kZertifikatanfrage`),
  KEY `kTechnologiepartner` (`kTechnologiepartner`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tzertifikatgewichtung
# ------------------------------------------------------------

CREATE TABLE `tzertifikatgewichtung` (
  `kGewichtung` int(11) NOT NULL AUTO_INCREMENT,
  `kLeistung` int(11) DEFAULT NULL,
  `kZertifikat` tinyint(4) DEFAULT NULL,
  `nGewichtung` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`kGewichtung`),
  KEY `kLeistung` (`kLeistung`),
  KEY `kZertifikat` (`kZertifikat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump tzertifikatprotokoll
# ------------------------------------------------------------

CREATE TABLE `tzertifikatprotokoll` (
  `kZertifikatprotokoll` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `kZertifikatanfrage` int(10) unsigned NOT NULL,
  `cBearbeiter` varchar(255) CHARACTER SET utf8 NOT NULL,
  `nStatus` int(10) unsigned NOT NULL,
  `cNotizIntern` text CHARACTER SET utf8 NOT NULL,
  `cNotizExtern` text CHARACTER SET utf8 NOT NULL,
  `dErstellt` int(10) unsigned NOT NULL,
  PRIMARY KEY (`kZertifikatprotokoll`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



# Tabellen-Dump tzertifizierung
# ------------------------------------------------------------

CREATE TABLE `tzertifizierung` (
  `kZertifizierung` int(10) NOT NULL AUTO_INCREMENT,
  `kZertifikat` int(10) NOT NULL,
  `kServicepartner` int(10) NOT NULL,
  `cAnrede` enum('Herr','Frau') NOT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `cMail` varchar(255) NOT NULL,
  `cTel` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGueltigBis` date NOT NULL,
  `dGeaendert` datetime NOT NULL,
  `nAktiv` int(11) NOT NULL DEFAULT '1',
  `bUrkunde` mediumblob NOT NULL,
  PRIMARY KEY (`kZertifizierung`),
  KEY `kZertifikat` (`kZertifikat`,`kServicepartner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabellen-Dump tzertifizierunghistoryprovision
# ------------------------------------------------------------

CREATE TABLE `tzertifizierunghistoryprovision` (
  `kZertifizierung` int(10) NOT NULL,
  `kZertifikat` int(10) NOT NULL,
  `kServicepartner` int(10) NOT NULL,
  `cVorname` varchar(255) NOT NULL,
  `cNachname` varchar(255) NOT NULL,
  `dErstellt` datetime NOT NULL,
  `dGueltigBis` date NOT NULL,
  `dGeaendert` datetime DEFAULT NULL,
  `nAktiv` int(11) NOT NULL DEFAULT '1',
  `dZeitpunkt` date NOT NULL,
  PRIMARY KEY (`kZertifizierung`,`dZeitpunkt`),
  KEY `tzertifizierunghistoryprovision_sp_provi_index` (`kServicepartner`,`dZeitpunkt`),
  KEY `tzertifizierunghistoryprovision_kZertifikat_index` (`kZertifikat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_activated_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_activated_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `status_before` tinyint(1) NOT NULL DEFAULT '0',
  `valid_until_before` datetime DEFAULT NULL,
  `status_after` tinyint(1) NOT NULL DEFAULT '0',
  `valid_until_after` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_activated_events_user_id_index` (`user_id`),
  KEY `vc_di_activated_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_activated_events_client_id_index` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_canceled_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_canceled_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `order_number` varchar(255) NOT NULL,
  `usage_amount` double(8,2) NOT NULL,
  `initial_amount` double(8,2) NOT NULL,
  `remaining_amount` double(8,2) NOT NULL,
  `used_amount` double(8,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_canceled_events_user_id_index` (`user_id`),
  KEY `vc_di_canceled_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_canceled_events_client_id_index` (`client_id`),
  KEY `vc_di_canceled_events_order_number_index` (`order_number`),
  KEY `vc_di_canceled_events_usage_amount_index` (`usage_amount`),
  KEY `vc_di_canceled_events_initial_amount_index` (`initial_amount`),
  KEY `vc_di_canceled_events_remaining_amount_index` (`remaining_amount`),
  KEY `vc_di_canceled_events_used_amount_index` (`used_amount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_charged_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_charged_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `order_number` varchar(255) NOT NULL,
  `usage_amount` double(8,2) NOT NULL,
  `initial_amount` double(8,2) NOT NULL,
  `remaining_amount` double(8,2) NOT NULL,
  `used_amount` double(8,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_charged_events_user_id_index` (`user_id`),
  KEY `vc_di_charged_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_charged_events_client_id_index` (`client_id`),
  KEY `vc_di_charged_events_order_number_index` (`order_number`),
  KEY `vc_di_charged_events_usage_amount_index` (`usage_amount`),
  KEY `vc_di_charged_events_initial_amount_index` (`initial_amount`),
  KEY `vc_di_charged_events_remaining_amount_index` (`remaining_amount`),
  KEY `vc_di_charged_events_used_amount_index` (`used_amount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_client_groups
# ------------------------------------------------------------

CREATE TABLE `vc_di_client_groups` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_clients
# ------------------------------------------------------------

CREATE TABLE `vc_di_clients` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `client_group_id` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `connected_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_code_request_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_code_request_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_code_request_events_user_id_index` (`user_id`),
  KEY `vc_di_code_request_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_code_request_events_client_id_index` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_created_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_created_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `voucher_id` varchar(255) NOT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `custom_id` varchar(255) DEFAULT NULL,
  `amount` double(8,2) NOT NULL,
  `currency` varchar(255) DEFAULT NULL,
  `valid_until` datetime DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `type` varchar(255) DEFAULT NULL,
  `gui` tinyint(1) NOT NULL DEFAULT '0',
  `taxable` tinyint(1) NOT NULL DEFAULT '0',
  `tax_rate` varchar(255) DEFAULT NULL,
  `validity_value` double(8,2) DEFAULT NULL,
  `validity_interval` varchar(255) DEFAULT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `order_number` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_created_events_amount_index` (`amount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_deactivated_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_deactivated_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `status_before` tinyint(1) NOT NULL DEFAULT '0',
  `valid_until_before` datetime DEFAULT NULL,
  `status_after` tinyint(1) NOT NULL DEFAULT '0',
  `valid_until_after` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_deactivated_events_user_id_index` (`user_id`),
  KEY `vc_di_deactivated_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_deactivated_events_client_id_index` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_deleted_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_deleted_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `voucher_id` varchar(255) NOT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `custom_id` varchar(255) DEFAULT NULL,
  `amount` double(8,2) NOT NULL,
  `currency` varchar(255) DEFAULT NULL,
  `valid_until` datetime DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `type` varchar(255) DEFAULT NULL,
  `gui` tinyint(1) NOT NULL DEFAULT '0',
  `taxable` tinyint(1) NOT NULL DEFAULT '0',
  `tax_rate` varchar(255) DEFAULT NULL,
  `validity_value` double(8,2) DEFAULT NULL,
  `validity_interval` varchar(255) DEFAULT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `order_number` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_deleted_events_amount_index` (`amount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_failed_jobs
# ------------------------------------------------------------

CREATE TABLE `vc_di_failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_migrations
# ------------------------------------------------------------

CREATE TABLE `vc_di_migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_recharged_events
# ------------------------------------------------------------

CREATE TABLE `vc_di_recharged_events` (
  `id` varchar(255) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `voucher_id` varchar(255) DEFAULT NULL,
  `client_id` varchar(255) DEFAULT NULL,
  `order_number` varchar(255) NOT NULL,
  `usage_amount` double(8,2) NOT NULL,
  `initial_amount` double(8,2) NOT NULL,
  `remaining_amount` double(8,2) NOT NULL,
  `used_amount` double(8,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `vc_di_recharged_events_user_id_index` (`user_id`),
  KEY `vc_di_recharged_events_voucher_id_index` (`voucher_id`),
  KEY `vc_di_recharged_events_client_id_index` (`client_id`),
  KEY `vc_di_recharged_events_order_number_index` (`order_number`),
  KEY `vc_di_recharged_events_usage_amount_index` (`usage_amount`),
  KEY `vc_di_recharged_events_initial_amount_index` (`initial_amount`),
  KEY `vc_di_recharged_events_remaining_amount_index` (`remaining_amount`),
  KEY `vc_di_recharged_events_used_amount_index` (`used_amount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



# Tabellen-Dump vc_di_users
# ------------------------------------------------------------

CREATE TABLE `vc_di_users` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of view api_v1_shop
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_shop`
AS SELECT
   `tshop`.`kShop` AS `id`,
   `tshop`.`kKaufprodukt` AS `product_id`,
   `tshop`.`cLizenzkey` AS `license_key`,
   `tshop`.`cDomain` AS `domain`,
   `tshop`.`cOutHash` AS `hash`,
   `tshop`.`cPfad` AS `uri`,
   `tshop`.`nLaufendeVersion` AS `version`,
   `tshop`.`dDownloadBis` AS `download_until`,
   `tshop`.`dErstellt` AS `created_at`
FROM `tshop`;

# Dump of view api_v1_product
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_product`
AS SELECT
   `tkaufprodukt`.`kKaufprodukt` AS `id`,
   `tkaufprodukt`.`cName` AS `name`,
   `tkaufprodukt`.`eTyp` AS `type`
FROM `tkaufprodukt`;

# Dump of view api_v1_pos_device_reset
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_pos_device_reset`
AS SELECT
   `tdevicereset`.`kDeviceReset` AS `id`,
   `tdevicereset`.`kDevice` AS `device_id`,
   `tdevicereset`.`cCode` AS `code`,
   `tdevicereset`.`dReceived` AS `received_at`,
   `tdevicereset`.`dCreated` AS `created_at`
FROM `tdevicereset`;

# Dump of view api_v1_shop_module
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_shop_module`
AS SELECT
   `tshopmodul`.`kShopModul` AS `id`,
   `tshopmodul`.`kKaufprodukt` AS `product_id`,
   `tshopmodul`.`kAccountGebunden` AS `user_id`,
   `tshopmodul`.`kShop` AS `shop_id`,
   `tshopmodul`.`cLizenzkey` AS `license_key`,
   `tshopmodul`.`dFreigeschaltet` AS `unlocked_at`,
   `tshopmodul`.`dErstellt` AS `created_at`
FROM `tshopmodul`;

# Dump of view api_v1_pos_payment_providers
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_pos_payment_providers`
AS SELECT
   `pos_payments`.`payment_provider_id` AS `id`,
   `pos_payments`.`account_id` AS `user_id`,
   `pos_payments`.`device_id` AS `device_id`,
   `pos_payments`.`state` AS `state`,
   `pos_payments`.`updated_at` AS `updated_at`,
   `pos_payments`.`created_at` AS `created_at`
FROM `pos_payments`;

# Dump of view api_v1_license
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_license`
AS SELECT
   `tlizenz`.`kLizenz` AS `id`,
   `tlizenz`.`kAccount` AS `user_id`,
   `tlizenz`.`cKey` AS `_key`,
   `tlizenz`.`kKey` AS `value`,
   `tlizenz`.`eTyp` AS `type`,
   `tlizenz`.`bBrandFree` AS `is_brand_free`
FROM `tlizenz`;

# Dump of view api_v1_pos_device
# ------------------------------------------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`kc_typo3_user`@`localhost` SQL SECURITY DEFINER VIEW `api_v1_pos_device`
AS SELECT
   `tdevice`.`kDevice` AS `id`,
   `tdevice`.`kAccount` AS `user_id`,
   `tdevice`.`nType` AS `type`,
   `tdevice`.`cId` AS `uid`,
   `tdevice`.`dUpdated` AS `updated_at`,
   `tdevice`.`dCreated` AS `created_at`
FROM `tdevice`;


