diff --git a/pages/Sublime Dump.md b/pages/Sublime Dump.md index 6af8cd98..8ea81ad9 100644 --- a/pages/Sublime Dump.md +++ b/pages/Sublime Dump.md @@ -475,5 +475,2552 @@ ``` - ``` SQL + CREATE DATABASE `monitoring_814` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; + + DROP TABLE IF EXISTS `alert`; + CREATE TABLE `alert` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `alert_id` int unsigned NOT NULL, + `volume` int NOT NULL DEFAULT 0, + `sentiment` int NOT NULL DEFAULT 0, + `datum` datetime NOT NULL, + `sent` datetime DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `alert_logging`; + CREATE TABLE `alert_logging` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `alert_id` int unsigned NOT NULL, + `volume` int NOT NULL DEFAULT 0, + `sentiment` int NOT NULL DEFAULT 0, + `datum` datetime NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `alexa`; + CREATE TABLE `alexa` ( + `sourceGuid` char(36) NOT NULL, + `rank` bigint unsigned NOT NULL, + `is_root_domain_rank` tinyint unsigned NOT NULL DEFAULT 0, + `reach_per_million` float NOT NULL DEFAULT 0, + `page_views_per_million` float NOT NULL DEFAULT 0, + `links_in_count` bigint unsigned NOT NULL DEFAULT 0, + UNIQUE KEY `sourceGuid` (`sourceGuid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `api_key_mapping`; + CREATE TABLE `api_key_mapping` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `api_key` varchar(100) NOT NULL DEFAULT '', + `user_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_api_key_user_id` (`api_key`,`user_id`), + KEY `index_api_key` (`api_key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `api_rate_limit_bucket_configuration`; + CREATE TABLE `api_rate_limit_bucket_configuration` ( + `id` int NOT NULL AUTO_INCREMENT, + `client` varchar(50) NOT NULL, + `customer_id` int NOT NULL, + `user_id` int DEFAULT NULL, + `bucket_group` varchar(50) NOT NULL, + `upper_bucket_size` int NOT NULL, + `upper_period_in_seconds` int NOT NULL, + `lower_bucket_size` int DEFAULT NULL, + `lower_period_in_seconds` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `author`; + CREATE TABLE `author` ( + `guid` char(36) NOT NULL, + `url` text NOT NULL, + `name` text NOT NULL, + `language_id` tinyint unsigned NOT NULL, + `country_id` tinyint unsigned NOT NULL, + `sourceguid` char(36) NOT NULL, + `authortype_id` tinyint unsigned NOT NULL, + `sourcetype_id` tinyint unsigned NOT NULL, + `relevance` int unsigned NOT NULL DEFAULT 0, + `profile` text DEFAULT NULL, + `checking` tinyint unsigned NOT NULL DEFAULT 0, + `followings` int NOT NULL DEFAULT 0, + `followers` int NOT NULL DEFAULT 0, + `registered_since` datetime DEFAULT NULL, + `post_count` int NOT NULL DEFAULT 0, + `total_views` int NOT NULL DEFAULT 0, + `uploads_count` int NOT NULL DEFAULT 0, + `img_url` text DEFAULT NULL, + PRIMARY KEY (`guid`), + KEY `sourcetype_id_checking` (`sourcetype_id`,`checking`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `author_review_metadata`; + CREATE TABLE `author_review_metadata` ( + `guid` char(36) NOT NULL, + `is_vine_user` tinyint DEFAULT NULL, + `is_hall_of_fame` tinyint DEFAULT NULL, + `is_seller` tinyint DEFAULT NULL, + `is_manufacturer` tinyint DEFAULT NULL, + `is_top_reviewer` tinyint DEFAULT NULL, + PRIMARY KEY (`guid`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `auto_reports_feeds_data`; + CREATE TABLE `auto_reports_feeds_data` ( + `day` date NOT NULL, + `feed_identifier` varchar(12) NOT NULL, + `volume` int DEFAULT NULL, + `change_1d_absolute` int DEFAULT NULL, + `change_1d_percent` float DEFAULT NULL, + PRIMARY KEY (`day`,`feed_identifier`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `auto_reports_hashtag_data`; + CREATE TABLE `auto_reports_hashtag_data` ( + `day` date NOT NULL, + `hashtag` varchar(192) NOT NULL, + `volume` int DEFAULT NULL, + `change_1d_absolute` int DEFAULT NULL, + `change_1d_percent` float DEFAULT NULL, + PRIMARY KEY (`day`,`hashtag`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `auto_reports_tags_data`; + CREATE TABLE `auto_reports_tags_data` ( + `day` date NOT NULL, + `tag` varchar(192) NOT NULL, + `volume` int DEFAULT NULL, + `change_1d_absolute` int DEFAULT NULL, + `change_1d_percent` float DEFAULT NULL, + PRIMARY KEY (`day`,`tag`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `base_hierarchy_id`; + CREATE TABLE `base_hierarchy_id` ( + `id` int NOT NULL AUTO_INCREMENT, + `type` enum('BRAND','REGION','PRODUCT_GROUP','GENERIC_HIERARCHY_FILTER') NOT NULL, + `hierarchy_id` int NOT NULL, + `customer_id` int NOT NULL, + `filter_name` varchar(256) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_author`; + CREATE TABLE `blacklist_author` ( + `guid` char(36) NOT NULL, + `name` varchar(255) NOT NULL, + `sourcetype_id` tinyint NOT NULL, + PRIMARY KEY (`guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_channel`; + CREATE TABLE `blacklist_channel` ( + `id` int NOT NULL AUTO_INCREMENT, + `source_guid` char(36) NOT NULL, + `sourcetype_id` tinyint NOT NULL, + `channel_id` varchar(255) NOT NULL, + `channel_name` varchar(255) DEFAULT NULL, + `user_id` int DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `date` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_phrase`; + CREATE TABLE `blacklist_phrase` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `source_guid` char(36) NOT NULL, + `phrase` varchar(100) NOT NULL, + PRIMARY KEY (`id`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_source`; + CREATE TABLE `blacklist_source` ( + `guid` char(36) NOT NULL, + `url` varchar(500) NOT NULL, + `sourcetype_id` tinyint NOT NULL, + `user_id` int DEFAULT 0, + `date` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_sourcename`; + CREATE TABLE `blacklist_sourcename` ( + `name` varchar(100) NOT NULL, + `url` varchar(100) NOT NULL, + `sourcetype_id` tinyint NOT NULL, + PRIMARY KEY (`name`,`url`,`sourcetype_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `blacklist_url`; + # CREATE TABLE `blacklist_url` ( + # `url` varchar(250) DEFAULT NULL, + # UNIQUE KEY `url_regex` (`url`) + # ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + CREATE TABLE `blacklist_url` ( + `url` varchar(250) NOT NULL, + PRIMARY KEY `url_regex` (`url`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `category`; + CREATE TABLE `category` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `category_list_id` int unsigned NOT NULL, + `name` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `category_list_id_name` (`category_list_id`,`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `configuration`; + CREATE TABLE `configuration` ( + `key` varchar(255) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `customer`; + CREATE TABLE `customer` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `editorial` tinyint DEFAULT NULL, + `token` varchar(45) DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `password_expiration_period` int NOT NULL DEFAULT 90 COMMENT 'password expiration period in days', + `max_inactivity_days` int NOT NULL DEFAULT 0, + `automated_sentiment` tinyint DEFAULT 0, + `created_by` int DEFAULT NULL, + `automated_sentiment_type` int DEFAULT NULL, + `inactive` tinyint DEFAULT NULL, + `tagged_mode_default_value` tinyint DEFAULT NULL, + `visibility_restriction_filter_id` int DEFAULT NULL, + `hide_author_names` tinyint DEFAULT NULL, + `basic_anonymization` tinyint DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uniquetoken` (`token`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `customer_metadata`; + CREATE TABLE `customer_metadata` ( + `customer_id` int NOT NULL, + `update_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `startpage_update_date` datetime DEFAULT NULL, + `startpage_sentiment_score` double DEFAULT 0, + `startpage_text` mediumtext DEFAULT NULL, + `contact_name` varchar(255) DEFAULT NULL, + `contact_pos` varchar(255) DEFAULT NULL, + `contact_tel` varchar(255) DEFAULT NULL, + `contact_mail` varchar(255) DEFAULT NULL, + `contact_html_text` mediumtext DEFAULT NULL, + `manual_url` varchar(255) DEFAULT NULL, + `theme_logo_url` varchar(255) DEFAULT NULL, + `theme_logo` varbinary(50000) DEFAULT NULL, + `theme_logo_analytics` blob DEFAULT NULL, + `theme_logo_type` varchar(4) DEFAULT NULL, + `theme_background_url` text DEFAULT NULL, + `theme_background_color` char(8) DEFAULT NULL, + `theme_main_color` char(8) DEFAULT '0x0084A8', + `customer_reference_name` varchar(255) DEFAULT NULL, + `customer_reference_mail` varchar(255) DEFAULT NULL, + `vico_reference_name` varchar(255) DEFAULT NULL, + `vico_reference_mail` varchar(255) DEFAULT NULL, + `views_for_analysis` varchar(50) DEFAULT NULL, + `sentiment_scale` text DEFAULT NULL, + `sentiment_ranges` text DEFAULT NULL, + `theme_id` bigint DEFAULT NULL, + `pptx_template_id` bigint DEFAULT NULL, + `docx_template_id` bigint DEFAULT NULL, + `xlsx_template_id` bigint DEFAULT NULL, + PRIMARY KEY (`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `customer_productkpidata`; + CREATE TABLE `customer_productkpidata` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `amz_rating` decimal(19,2) DEFAULT NULL, + `amz_rating_prev` decimal(19,2) DEFAULT NULL, + `asin` varchar(32) DEFAULT NULL, + `cproductId_hi` bigint DEFAULT NULL, + `cproductId_lo` bigint DEFAULT NULL, + `customerId` int DEFAULT NULL, + `ean` varchar(32) DEFAULT NULL, + `language` int DEFAULT NULL, + `lifetime_rating` decimal(19,2) DEFAULT NULL, + `lifetime_rating_prev` decimal(19,2) DEFAULT NULL, + `lifetime_volume` decimal(19,2) DEFAULT NULL, + `name` longtext , + `price` decimal(19,2) DEFAULT NULL, + `price_prev` decimal(19,2) DEFAULT NULL, + `rating` decimal(19,2) DEFAULT NULL, + `rating_1star` int DEFAULT NULL, + `rating_2star` int DEFAULT NULL, + `rating_3star` int DEFAULT NULL, + `rating_4star` int DEFAULT NULL, + `rating_5star` int DEFAULT NULL, + `rating_prev` decimal(19,2) DEFAULT NULL, + `shopId` int DEFAULT NULL, + `version` int DEFAULT NULL, + `volume` int DEFAULT NULL, + `volume_prev` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_prim` (`customerId`,`version`,`language`,`cproductId_hi`,`cproductId_lo`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_channel`; + CREATE TABLE `dashboard_channel` ( + `id` int NOT NULL AUTO_INCREMENT, + `customer_id` int NOT NULL, + `entity_guid` char(36) NOT NULL DEFAULT '', + `sourcetype_id` tinyint unsigned NOT NULL DEFAULT 0, + `channel_name` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `display_name` varchar(255) DEFAULT NULL, + `source_guid` char(36) DEFAULT NULL, + `channel_id` varchar(255) DEFAULT NULL, + `country` tinyint NOT NULL DEFAULT 0, + `language` tinyint NOT NULL DEFAULT 0, + `authentication_token` varchar(200) DEFAULT NULL, + `marked_as_owned` tinyint DEFAULT 0, + `token_id` int DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `customer_id_source_guid_channel_id` (`customer_id`,`source_guid`,`channel_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view`; + CREATE TABLE `dashboard_view` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `comment` varchar(255) DEFAULT NULL, + `user_id` int NOT NULL DEFAULT 0, + `role_id` int NOT NULL DEFAULT 0, + `group_id` int NOT NULL DEFAULT 0, + `is_default` int NOT NULL DEFAULT 0, + `keywords` text DEFAULT NULL, + `sortorder` int DEFAULT NULL, + `root_id` int NOT NULL, + `visible` tinyint unsigned NOT NULL DEFAULT 1, + `customer_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node`; + CREATE TABLE `dashboard_view_node` ( + `id` int NOT NULL AUTO_INCREMENT, + `identifier` varchar(50) NOT NULL DEFAULT '', + `parent_id` int NOT NULL, + `name` varchar(100) NOT NULL, + `checked` tinyint NOT NULL, + `type` tinyint NOT NULL, + `sortorder` int unsigned NOT NULL DEFAULT 0, + `entry_count_30` int unsigned NOT NULL DEFAULT 0, + `is_topic` tinyint unsigned NOT NULL DEFAULT 0, + `top_topic` tinyint unsigned NOT NULL DEFAULT 0, + `editorial` tinyint DEFAULT 0, + `restricting_subnode` tinyint DEFAULT 0, + `spssname` varchar(100) NOT NULL DEFAULT '', + `sentiment_parent_id` int NOT NULL DEFAULT 0, + `topics` varchar(255) DEFAULT NULL, + `token` varchar(45) DEFAULT NULL, + `multitagging` tinyint DEFAULT NULL, + `creation_user_id` int DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `update_user_id` int DEFAULT NULL, + `node_custom_color` char(8) DEFAULT NULL, + `sentiment_type` tinyint unsigned NOT NULL DEFAULT 1, + `external_export` tinyint DEFAULT 0, + `forces_sentiment` tinyint DEFAULT 0, + `multiple_validation` tinyint DEFAULT 0, + `inactive` tinyint DEFAULT 0, + `volumeexceeded` tinyint DEFAULT 0, + `auto_sentiment` tinyint DEFAULT 1, + `complement` tinyint unsigned DEFAULT NULL, + `linked_to_id` int DEFAULT NULL, + `tagged` tinyint DEFAULT 0, + `structural` tinyint DEFAULT 0, + `channels_inherited` tinyint unsigned DEFAULT 0, + `social_metric` tinyint unsigned DEFAULT 0, + `social_metric_channel_id` int DEFAULT NULL, + `retrieve_amazon_comments` tinyint unsigned NOT NULL DEFAULT 0, + `retrieve_amazon_qa` tinyint unsigned NOT NULL DEFAULT 0, + `retrieve_prices` tinyint unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_category`; + CREATE TABLE `dashboard_view_node_category` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `node_id` int DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `namenode` (`name`,`node_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_category_topic`; + CREATE TABLE `dashboard_view_node_category_topic` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `category_id` int DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `namecategory` (`name`,`category_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_channel`; + CREATE TABLE `dashboard_view_node_channel` ( + `node_id` int NOT NULL, + `channel_id` int NOT NULL, + UNIQUE KEY `UniqueRow` (`node_id`,`channel_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_custom_query`; + CREATE TABLE `dashboard_view_node_custom_query` ( + `id` int NOT NULL AUTO_INCREMENT, + `query` text NOT NULL, + `node_id` int NOT NULL, + `description` text DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_customer_product`; + CREATE TABLE `dashboard_view_node_customer_product` ( + `node_id` int NOT NULL, + `uuid` varchar(36) NOT NULL, + UNIQUE KEY `uniquekey1` (`node_id`,`uuid`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_entity`; + CREATE TABLE `dashboard_view_node_entity` ( + `node_id` int NOT NULL DEFAULT 0, + `entity_guid` char(36) NOT NULL DEFAULT '', + `sourcetype_id` tinyint unsigned NOT NULL DEFAULT 0, + `source_guid` char(36) DEFAULT NULL, + `channel_id` varchar(255) DEFAULT NULL, + `channel_name` varchar(255) DEFAULT NULL, + `url` varchar(255) DEFAULT NULL, + `display_name` varchar(255) DEFAULT NULL, + `country` tinyint NOT NULL DEFAULT 0, + `language` tinyint NOT NULL DEFAULT 0, + PRIMARY KEY (`node_id`,`entity_guid`), + UNIQUE KEY `node_id_source_guid_channel_id` (`node_id`,`source_guid`,`channel_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_product_category`; + CREATE TABLE `dashboard_view_node_product_category` ( + `node_id` int NOT NULL, + `product_category_identifier` varchar(36) NOT NULL, + UNIQUE KEY `node_id_product_category_identifier` (`node_id`,`product_category_identifier`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `dashboard_view_node_query`; + CREATE TABLE `dashboard_view_node_query` ( + `id` int NOT NULL AUTO_INCREMENT, + `node_id` int NOT NULL, + `query` text NOT NULL, + `language_id` int NOT NULL, + `sourceset_id` int DEFAULT NULL, + `pos_in_node` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `entry_editorial`; + # InnoDB change: Added primary key + CREATE TABLE `entry_editorial` ( + `guid` char(36) NOT NULL, + `node_id` int unsigned NOT NULL, + `category_id` int unsigned NOT NULL, + `topic_id` int unsigned NOT NULL, + `sentiment` tinyint NOT NULL DEFAULT 0, + KEY `guid` (`guid`), + PRIMARY KEY (`guid`,`node_id`,`category_id`,`topic_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `filter_alias`; + CREATE TABLE `filter_alias` ( + `id` int NOT NULL AUTO_INCREMENT, + `customer_id` int NOT NULL, + `filter_id` int NOT NULL, + `filter_alias` varchar(100) NOT NULL, + `locale` varchar(100) DEFAULT NULL, + `is_hierarchy` tinyint NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `filter_alias_UN` (`customer_id`,`filter_id`,`locale`,`is_hierarchy`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `filter_keywords`; + # InnoDB change: Added primary key + CREATE TABLE `filter_keywords` ( + `keyword` mediumtext NOT NULL, + `id` int NOT NULL, + `language_id` tinyint unsigned NOT NULL, + PRIMARY KEY (`id`,`language_id`, `keyword`(255)) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `filter_list`; + CREATE TABLE `filter_list` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(45) DEFAULT NULL, + `user_id` int DEFAULT NULL, + `global` tinyint DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `group`; + CREATE TABLE `group` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(45) DEFAULT NULL, + `parent_id` int DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `cust_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `group_customer`; + CREATE TABLE `group_customer` ( + `group_id` int NOT NULL, + `customer_id` int NOT NULL, + PRIMARY KEY (`group_id`,`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `group_project`; + CREATE TABLE `group_project` ( + `group_id` int NOT NULL, + `project_id` bigint NOT NULL, + PRIMARY KEY (`group_id`,`project_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `indexer_parameters`; + CREATE TABLE `indexer_parameters` ( + `date` datetime NOT NULL, + `sourceType` int unsigned NOT NULL, + `schema` varchar(255) NOT NULL, + `dbm` varchar(50) NOT NULL, + `mode` enum('ID','DATE') NOT NULL DEFAULT 'DATE', + `maxid` int unsigned NOT NULL DEFAULT 0, + `maxidOld` int unsigned NOT NULL DEFAULT 0, + `exception` text DEFAULT NULL, + `numExceptions` int NOT NULL DEFAULT 0, + PRIMARY KEY (`sourceType`,`schema`,`dbm`,`mode`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `language`; + CREATE TABLE `language` ( + `id` int NOT NULL, + `language` varchar(45) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `list_author`; + CREATE TABLE `list_author` ( + `list_id` int NOT NULL, + `author_guid` varchar(45) NOT NULL, + `tagged` tinyint unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`list_id`,`author_guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `list_document`; + CREATE TABLE `list_document` ( + `list_id` int NOT NULL, + `document_guid` varchar(45) NOT NULL, + PRIMARY KEY (`list_id`,`document_guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `list_source`; + CREATE TABLE `list_source` ( + `list_id` int NOT NULL, + `source_guid` varchar(45) NOT NULL, + `tagged` tinyint unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`list_id`,`source_guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_customer`; + # InnoDB change: Added id + CREATE TABLE `log_customer` ( + `id` int NOT NULL AUTO_INCREMENT, + `date` datetime NOT NULL, + `customer_id` int DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `action` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_macro`; + # InnoDB change: Added id + CREATE TABLE `log_macro` ( + `id` int NOT NULL AUTO_INCREMENT, + `date` datetime NOT NULL, + `macro_id` int DEFAULT NULL, + `query` text DEFAULT NULL, + `user_id` int DEFAULT NULL, + `action` int DEFAULT NULL, + `description` text DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_node`; + # InnoDB change: Added id + CREATE TABLE `log_node` ( + `id` int NOT NULL AUTO_INCREMENT, + `date` datetime NOT NULL, + `node_id` int DEFAULT NULL, + `view_id` int DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `action` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + `restricting_subnode` tinyint DEFAULT NULL, + `parent_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_product_category`; + # InnoDB change: Added id + CREATE TABLE `log_product_category` ( + `id` int NOT NULL AUTO_INCREMENT, + `hierarchy_id` int NOT NULL, + `category_id` int NOT NULL COMMENT 'in case of creating and deleting hierarchies set this to 0', + `customer_product_id` varchar(36) DEFAULT NULL, + `linked_feed_id` int DEFAULT NULL, + `user_id` int NOT NULL, + `customer_id` int NOT NULL, + `action` enum('ADD_PRODUCT','REMOVE_PRODUCT','ADD_LINKED_FEED','REMOVE_LINKED_FEED','CREATE_HIERARCHY','DELETE_HIERARCHY','CREATE_CATEGORY','DELETE_CATEGORY','CHANGE_NAME','CHANGE_COLOR') COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_query`; + # InnoDB change: Added id + CREATE TABLE `log_query` ( + `id` int NOT NULL AUTO_INCREMENT, + `date` datetime NOT NULL, + `query_id` int DEFAULT NULL, + `query` text DEFAULT NULL, + `node_id` int DEFAULT NULL, + `language_id` int DEFAULT NULL, + `sourceset_id` int DEFAULT NULL, + `action` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + `channels` text DEFAULT NULL, + `pos_in_node` int DEFAULT NULL, + `description` text DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `log_report`; + CREATE TABLE `log_report` ( + `id` int NOT NULL AUTO_INCREMENT, + `report_id` int DEFAULT NULL, + `report_name` varchar(255) DEFAULT NULL, + `status` enum('STARTED','FILE_PRODUCED','MAIL_SENT','FAILED') NOT NULL, + `started_at` datetime DEFAULT NULL, + `file_produced_at` datetime DEFAULT NULL, + `mail_sent_at` datetime DEFAULT NULL, + `failed_at` datetime DEFAULT NULL, + `error_message` text DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `macro`; + CREATE TABLE `macro` ( + `id` int NOT NULL AUTO_INCREMENT, + `customer_id` int DEFAULT NULL, + `category_id` int DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `query` text DEFAULT NULL, + `created` datetime DEFAULT NULL, + `created_by` int DEFAULT NULL, + `updated` datetime DEFAULT NULL, + `updated_by` int DEFAULT NULL, + `description` text DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `customer_id_category_id_name` (`customer_id`,`category_id`,`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `macro_category`; + CREATE TABLE `macro_category` ( + `id` int NOT NULL AUTO_INCREMENT, + `customer_id` int DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `created` datetime DEFAULT NULL, + `created_by` int DEFAULT NULL, + `updated` datetime DEFAULT NULL, + `updated_by` int DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `customer_name` (`name`,`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `market_price_class`; + CREATE TABLE `market_price_class` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `class_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `country_id` int DEFAULT NULL, + `customer_id` int NOT NULL, + `customer_product_category` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `max_price` decimal(8,2) DEFAULT NULL, + `min_price` decimal(8,2) DEFAULT NULL, + `valid_from` datetime NOT NULL, + `valid_to` datetime NOT NULL, + PRIMARY KEY (`id`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `node_sentiment_model`; + CREATE TABLE `node_sentiment_model` ( + `node_id` int NOT NULL, + `language_id` int NOT NULL, + `model_id` int NOT NULL, + PRIMARY KEY (`node_id`,`language_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `node_sentimentquery`; + CREATE TABLE `node_sentimentquery` ( + `node_id` int NOT NULL, + `sentimentquery_id` int NOT NULL, + `language_id` int NOT NULL, + `sentiment` int NOT NULL, + UNIQUE KEY `Schlüssel 1` (`node_id`,`sentimentquery_id`,`language_id`,`sentiment`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `oauth_access_token`; + CREATE TABLE `oauth_access_token` ( + `token_id` varchar(45) NOT NULL, + `token` blob DEFAULT NULL, + `authentication_id` varchar(45) DEFAULT NULL, + `user_name` varchar(45) DEFAULT NULL, + `client_id` varchar(45) DEFAULT NULL, + `authentication` blob DEFAULT NULL, + `refresh_token` varchar(45) DEFAULT NULL, + PRIMARY KEY (`token_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `oauth_client_details`; + CREATE TABLE `oauth_client_details` ( + `client_id` varchar(205) NOT NULL, + `resource_ids` varchar(205) DEFAULT NULL, + `client_secret` varchar(205) DEFAULT NULL, + `scope` varchar(205) DEFAULT NULL, + `authorized_grant_types` varchar(205) DEFAULT NULL, + `web_server_redirect_uri` varchar(205) DEFAULT NULL, + `authorities` varchar(205) DEFAULT NULL, + `access_token_validity` int DEFAULT NULL, + `refresh_token_validity` int DEFAULT NULL, + `additional_information` varchar(220) DEFAULT NULL, + `autoapprove` varchar(205) DEFAULT NULL, + PRIMARY KEY (`client_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_customer_booking`; + CREATE TABLE `pricing_customer_booking` ( + `id` int NOT NULL AUTO_INCREMENT, + `pricing_type` int DEFAULT NULL, + `reference_id` int DEFAULT NULL, + `quantity` int DEFAULT NULL, + `customer_id` float DEFAULT NULL, + `date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_customer_price`; + # InnoDB change: Added primary key + CREATE TABLE `pricing_customer_price` ( + `customer_id` int NOT NULL, + `pricing_type` int NOT NULL, + `reference_id` int NOT NULL, + `price` float DEFAULT NULL, + PRIMARY KEY (`customer_id`,`pricing_type`,`reference_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_customer_volume`; + CREATE TABLE `pricing_customer_volume` ( + `customer_id` int NOT NULL DEFAULT 0, + `date` date NOT NULL DEFAULT '1970-01-01', + `volume` int DEFAULT NULL, + `volume_exceeded` tinyint DEFAULT NULL, + `volume_trend_exceeded` tinyint DEFAULT NULL, + `volume_percent_exceeded` int DEFAULT NULL, + `mail_sent_exceeded` datetime DEFAULT NULL, + `mail_sent_trend_exceeded` datetime DEFAULT NULL, + `mail_sent_percent_exceeded` datetime DEFAULT NULL, + `mail_sent_110_percent_exceeded` datetime DEFAULT NULL, + `mail_sent_150_percent_exceeded` datetime DEFAULT NULL, + PRIMARY KEY (`customer_id`,`date`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_feature`; + CREATE TABLE `pricing_feature` ( + `id` int NOT NULL AUTO_INCREMENT, + `feature_type` int NOT NULL DEFAULT 0, + `name` varchar(255) NOT NULL DEFAULT '0', + `definition` text NOT NULL, + `value` int NOT NULL DEFAULT 0, + `price` float NOT NULL DEFAULT 0, + `bookable` tinyint DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `feature_type_name_bookable` (`feature_type`,`name`,`bookable`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_feed_volume`; + CREATE TABLE `pricing_feed_volume` ( + `feed_id` int NOT NULL, + `date` date NOT NULL, + `volume` int DEFAULT NULL, + `customer_id` int DEFAULT NULL, + PRIMARY KEY (`feed_id`,`date`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_package`; + CREATE TABLE `pricing_package` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '0', + `price` float NOT NULL DEFAULT 0, + `required_package` int DEFAULT 0, + `base_package` tinyint DEFAULT 0, + `description` text DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `pricing_package_feature`; + CREATE TABLE `pricing_package_feature` ( + `package_id` int NOT NULL, + `feature_id` int NOT NULL, + PRIMARY KEY (`package_id`,`feature_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `product_reference_price`; + CREATE TABLE `product_reference_price` ( + `id` varchar(36) NOT NULL, + `name` varchar(100) DEFAULT NULL, + `price` decimal(10,2) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `rate_limit_configuration`; + CREATE TABLE `rate_limit_configuration` ( + `id` int NOT NULL AUTO_INCREMENT, + `client` varchar(255) NOT NULL, + `customer_id` int NOT NULL, + `user_id` int DEFAULT NULL, + `bucket_size` bigint NOT NULL, + `period_in_seconds` bigint NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + # DROP TABLE IF EXISTS TABLE `reference_date`; + # CREATE TABLE `reference_date` ( + # `oldest` date DEFAULT NULL, + # `latest` date DEFAULT NULL + # ) ENGINE=MyISAM DEFAULT CHARSET=utf8 + + DROP TABLE IF EXISTS `rights`; + CREATE TABLE `rights` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(45) DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `role`; + CREATE TABLE `role` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `user_id` int DEFAULT NULL, + `invisible` tinyint NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `role_grant_role`; + CREATE TABLE `role_grant_role` ( + `granting_role_id` int NOT NULL, + `granted_role_id` int NOT NULL, + PRIMARY KEY (`granting_role_id`,`granted_role_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `role_rights`; + CREATE TABLE `role_rights` ( + `role_id` int NOT NULL, + `right_id` varchar(45) NOT NULL, + `read` tinyint DEFAULT NULL, + `write` tinyint DEFAULT NULL, + PRIMARY KEY (`role_id`,`right_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `scheduled_export_task`; + CREATE TABLE `scheduled_export_task` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `export_type` enum('DLW_LEGACY','DLW_FEEDBASED','DLW_CUSTOM_COLUMNS_LEGACY','DLW_CUSTOM_COLUMNS_FEEDBASED','DCW','PERSPECTIVE','DASHBOARD','PRODUCT_PRICE_LIST','PRODUCT_LIST','MARKET_PRICE_CLASS_LIST','DOCUMENT_LIST') COLLATE utf8mb4_unicode_ci NOT NULL, + `commissioned_at` datetime DEFAULT NULL, + `export_format` varchar(255) DEFAULT NULL, + `file_name` varchar(255) DEFAULT NULL, + `worker_id` varchar(256) NOT NULL, + `dashboard_id` bigint DEFAULT NULL, + `file_path` varchar(255) DEFAULT NULL, + `filter` longblob DEFAULT NULL, + `finished_at` datetime DEFAULT NULL, + `started_at` datetime DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `user` longblob DEFAULT NULL, + `widget` longblob DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `searchterm_management_log`; + CREATE TABLE `searchterm_management_log` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `started` datetime NOT NULL, + `finished` datetime DEFAULT NULL, + `action` mediumtext NOT NULL, + `params` mediumtext DEFAULT NULL, + `error` mediumtext DEFAULT NULL, + `user_id` int unsigned NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `sentiment_model_trials`; + # InnoDB change: Added primary key (correct?) + CREATE TABLE `sentiment_model_trials` ( + `model_id` int NOT NULL, + `sentiment` tinyint NOT NULL, + `precision` decimal(4,3) DEFAULT NULL, + `recall` decimal(4,3) DEFAULT NULL, + `gold_size` int NOT NULL, + `predicted_size` int NOT NULL, + `est_ddiff` decimal(4,3) DEFAULT NULL, + `trial_id` int NOT NULL, + `series_id` int NOT NULL, + PRIMARY KEY (`model_id`,`sentiment`,`trial_id`,`series_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `sentiment_models`; + CREATE TABLE `sentiment_models` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `file_name` varchar(255) NOT NULL, + `description` varchar(511) NOT NULL, + `customer_id` int unsigned DEFAULT NULL, + `language_id` int NOT NULL, + `accuracy` decimal(5,2) NOT NULL, + `comment` varchar(2000) NOT NULL, + `is_default` tinyint NOT NULL DEFAULT 0, + `last_update` datetime DEFAULT NULL, + `last_annot_date` datetime DEFAULT NULL, + `last_checked` datetime DEFAULT NULL, + `has_trials` tinyint NOT NULL DEFAULT 0, + `method` int NOT NULL DEFAULT 0, + `is_global` int DEFAULT NULL, + `global_for_customer` int NOT NULL DEFAULT 0, + `is_multiple_validated` tinyint unsigned DEFAULT 0, + `allow_simply_validated` tinyint unsigned DEFAULT 0, + `is_strict` tinyint unsigned DEFAULT 1, + `min_validation` smallint unsigned DEFAULT 0, + `w2v_model_name` varchar(200) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `sentimentquery`; + CREATE TABLE `sentimentquery` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` tinytext NOT NULL, + `query` text NOT NULL, + `language_id` int NOT NULL DEFAULT 0, + `customer_id` int NOT NULL DEFAULT 0, + `sentiment` tinyint NOT NULL, + `priority` int NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `service_entry`; + CREATE TABLE `service_entry` ( + `guid` char(36) NOT NULL, + `pub_date` datetime NOT NULL, + `update_date` datetime NOT NULL, + `document_type_id` tinyint unsigned NOT NULL, + `url` varchar(400) NOT NULL, + `title` text NOT NULL, + `content` text NOT NULL, + `sourcetype_id` tinyint unsigned NOT NULL, + `sourceguid` char(36) NOT NULL, + `language_id` tinyint unsigned NOT NULL, + `country_id` tinyint unsigned NOT NULL, + `author_name` varchar(255) NOT NULL, + `author_url` varchar(400) NOT NULL, + `author_picture_url` varchar(400) NOT NULL, + `thread_name` varchar(255) NOT NULL, + `thread_url` varchar(400) NOT NULL, + `comment_count` int unsigned NOT NULL, + `like_count` int unsigned NOT NULL, + `dislike_count` int unsigned NOT NULL DEFAULT 0, + `metadata` text NOT NULL, + `author_is_channel` tinyint NOT NULL DEFAULT 0, + `original_entry_id` varchar(200) NOT NULL, + `original_conversation_id` varchar(200) NOT NULL, + `in_reply_to_id` varchar(200) NOT NULL, + PRIMARY KEY (`guid`), + KEY `sourcetype_id` (`sourcetype_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `shared_clipboard`; + CREATE TABLE `shared_clipboard` ( + `id` int NOT NULL AUTO_INCREMENT, + `owner_user_id` int NOT NULL, + `shared_user_id` int NOT NULL, + `customer_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `shared_clipboard_UN` (`shared_user_id`,`owner_user_id`,`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `source`; + CREATE TABLE `source` ( + `guid` char(36) NOT NULL, + `url` text NOT NULL, + `name` text NOT NULL, + `language_id` int unsigned NOT NULL, + `country_id` int unsigned NOT NULL, + `sourcetype_id` int unsigned NOT NULL, + `relevance` int unsigned NOT NULL DEFAULT 0, + `category` int DEFAULT NULL, + `token` char(5) NOT NULL DEFAULT 'YYYYY', + `is_new` tinyint unsigned NOT NULL DEFAULT 1, + `alexa_checked` tinyint unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`guid`), + KEY `alexa_checked` (`alexa_checked`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `sourceset`; + CREATE TABLE `sourceset` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `language_id` int unsigned NOT NULL, + `read_only` tinyint unsigned NOT NULL DEFAULT 0, + `customer_id` int DEFAULT NULL, + `editor` int DEFAULT NULL, + `edit_date` datetime DEFAULT NULL, + `creator` int DEFAULT NULL, + `creation_date` datetime DEFAULT NULL, + `blacklist` tinyint DEFAULT NULL, + `global` tinyint unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `sourceset_subselection`; + # InnoDB change: Primary Key + CREATE TABLE `sourceset_subselection` ( + `id` int unsigned NOT NULL, + `source_guid` char(36) NOT NULL, + KEY `id` (`id`), + PRIMARY KEY (`id`, `source_guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `sourceset_types`; + CREATE TABLE `sourceset_types` ( + `sourceset_id` int unsigned NOT NULL, + `sourcetype_id` int unsigned NOT NULL, + `subselection_id` int unsigned DEFAULT NULL, + `exclude` tinyint DEFAULT NULL, + UNIQUE KEY `sourceset_id_source` (`sourceset_id`,`sourcetype_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `station_annotator_errors`; + CREATE TABLE `station_annotator_errors` ( + `incident_id` int NOT NULL AUTO_INCREMENT, + `incident_date` datetime NOT NULL, + `resolved` tinyint NOT NULL, + `document_pubdate` datetime DEFAULT NULL, + `document_guid` char(36) DEFAULT NULL, + `document_url` varchar(1024) DEFAULT NULL, + `kafka_topic` varchar(100) NOT NULL, + `kafka_partition` int DEFAULT NULL, + `kafka_offset` bigint NOT NULL, + `context` varchar(100) DEFAULT NULL, + `cause` mediumtext DEFAULT NULL, + PRIMARY KEY (`incident_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `statistics_user_action`; + CREATE TABLE `statistics_user_action` ( + `id` int NOT NULL AUTO_INCREMENT, + `action` varchar(255) DEFAULT NULL, + `action_date` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `UK_hb9cx5iul3rcoe6f1oxr1pyp8` (`user_id`), + KEY `UK_jotnkms79a9o7vgjic3gcdvel` (`customer_id`), + KEY `UK_q2c6aey518l3mr69i6evj8u1n` (`action`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `stopwords`; + # InnoDB change: Added primary key + CREATE TABLE `stopwords` ( + `stopword` varchar(100) NOT NULL, + `customer_id` int NOT NULL DEFAULT 0, + `global` tinyint unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`stopword`,`customer_id`, `global`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `stored_searches`; + CREATE TABLE `stored_searches` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `search_str` mediumtext DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `user_id` int unsigned DEFAULT NULL, + `role_id` int unsigned DEFAULT NULL, + `group_id` int unsigned DEFAULT NULL, + `customer_id` int unsigned DEFAULT NULL, + `global` tinyint unsigned NOT NULL DEFAULT 0, + `created` datetime DEFAULT NULL, + `updated_by` int DEFAULT NULL, + `updated` datetime DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `synonym_tagcloud_tokens`; + CREATE TABLE `synonym_tagcloud_tokens` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `canonical` varchar(255) NOT NULL, + `pos` enum('a','n') NOT NULL, + `language_id` tinyint unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `canonical_pos_language_id` (`canonical`,`pos`,`language_id`), + KEY `language_id` (`language_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `synonym_tagcloud_variants`; + CREATE TABLE `synonym_tagcloud_variants` ( + `token_id` int unsigned NOT NULL, + `variant` varchar(255) NOT NULL, + UNIQUE KEY `variant_token_id` (`variant`,`token_id`), + KEY `token_id` (`token_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `thread`; + CREATE TABLE `thread` ( + `guid` char(36) NOT NULL, + `url` text NOT NULL, + `name` text NOT NULL, + `language_id` int unsigned NOT NULL, + `country_id` int unsigned NOT NULL, + `sourceguid` char(36) NOT NULL, + `authorguid` char(36) DEFAULT NULL, + `relevance` int unsigned NOT NULL DEFAULT 0, + `sourcetype_id` int unsigned NOT NULL, + `reach` int unsigned NOT NULL, + `characteristic1` int unsigned NOT NULL, + `characteristic2` int unsigned NOT NULL, + `characteristic3` int unsigned NOT NULL, + PRIMARY KEY (`guid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `topic`; + CREATE TABLE `topic` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `modelid` int unsigned NOT NULL, + `name` text NOT NULL, + `keywords` text , + `hidden` tinyint unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `topicmodel`; + CREATE TABLE `topicmodel` ( + `id` int unsigned NOT NULL, + `name` text NOT NULL, + `file_name` text NOT NULL, + `language_id` smallint unsigned NOT NULL, + `last_update` datetime NOT NULL, + `last_train_date` datetime NOT NULL, + `last_checked` datetime NOT NULL, + `topic_number` int unsigned NOT NULL, + `upd_interval` bigint unsigned NOT NULL, + `train_size` int unsigned NOT NULL, + `min_train_size` int unsigned NOT NULL, + `max_topics` int unsigned NOT NULL, + `threshold` double NOT NULL, + `est_threshold` double NOT NULL, + `version` int unsigned NOT NULL, + `window` int unsigned NOT NULL, + `oldest` int unsigned NOT NULL, + `sim_threshold` double NOT NULL, + `customer_id` int unsigned DEFAULT '0', + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `topicmodel_node`; + CREATE TABLE `topicmodel_node` ( + `node_id` int unsigned NOT NULL, + `language_id` int unsigned NOT NULL, + `model_id` int unsigned NOT NULL, + UNIQUE KEY `model_id` (`model_id`,`node_id`,`language_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + # ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=FIXED + + DROP TABLE IF EXISTS `topicmodel_topic`; + CREATE TABLE `topicmodel_topic` ( + `modelid` int unsigned NOT NULL, + `indice` int unsigned NOT NULL, + `version` int unsigned NOT NULL, + `topicid` bigint unsigned NOT NULL, + `enabled` tinyint unsigned NOT NULL, + `raisedwords` text NOT NULL, + UNIQUE KEY `Index 1` (`modelid`,`version`,`indice`,`topicid`), + KEY `topicid` (`topicid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `topicstopwords`; + # InnoDB change: Added primary key + CREATE TABLE `topicstopwords` ( + `word` text NOT NULL, + `languageid` smallint NOT NULL, + `customerid` smallint NOT NULL DEFAULT '0', + PRIMARY KEY (`word`(255),`languageid`,`customerid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_abo`; + CREATE TABLE `user_abo` ( + `abo_id` int unsigned NOT NULL AUTO_INCREMENT, + `user_id` int unsigned NOT NULL, + `from` varchar(255) NOT NULL, + `to` varchar(255) NOT NULL DEFAULT '', + `cc` varchar(255) DEFAULT NULL, + `bcc` varchar(255) DEFAULT NULL, + `subject` tinytext NOT NULL, + `comment` tinytext DEFAULT NULL, + `mailingType` tinyint NOT NULL DEFAULT 0, + `intervall` tinyint NOT NULL DEFAULT 0, + `day` tinyint NOT NULL DEFAULT 0, + `lastsent` datetime DEFAULT NULL, + `countries` varchar(255) DEFAULT '', + `languages` varchar(255) DEFAULT '', + `sources` varchar(255) DEFAULT '', + `nodes` varchar(255) DEFAULT '', + `tagnames` varchar(255) DEFAULT '', + `sentiment` varchar(255) DEFAULT '', + `unit` varchar(255) DEFAULT '', + `hotspot` varchar(255) DEFAULT '', + `hotspottype` tinyint DEFAULT NULL, + `timeframe` int unsigned DEFAULT NULL, + `restrict` text DEFAULT NULL, + `blacklist_id` int DEFAULT NULL, + `whitelist_id` int DEFAULT NULL, + PRIMARY KEY (`abo_id`,`user_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_alert`; + CREATE TABLE `user_alert` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `user_id` int unsigned NOT NULL, + `node_id` int unsigned NOT NULL DEFAULT 0, + `volume_bound` int NOT NULL DEFAULT 0, + `sentiment_bound` int NOT NULL DEFAULT 0, + `to_addresses` text DEFAULT NULL, + `comment` text DEFAULT NULL, + `black_list` text DEFAULT NULL, + `white_list` text DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `timespan` int unsigned DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_annotations`; + CREATE TABLE `user_annotations` ( + `id` int NOT NULL AUTO_INCREMENT, + `type` tinyint unsigned NOT NULL, + `created` datetime NOT NULL, + `user_id` int NOT NULL, + `document_guid` char(36) NOT NULL, + `language_id` tinyint unsigned NOT NULL DEFAULT 0, + `params` text NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_filters`; + CREATE TABLE `user_filters` ( + `user_id` int unsigned NOT NULL, + `name` varchar(255) CHARACTER SET latin1 NOT NULL, + `is_default` int unsigned DEFAULT NULL, + `is_global` int unsigned DEFAULT NULL, + `start_date` date DEFAULT '1970-01-01', + `end_date` date DEFAULT '1970-01-01', + `analysis_view` int unsigned DEFAULT NULL, + `node_selection` varchar(255) DEFAULT NULL, + `source_selection` varchar(255) DEFAULT NULL, + `language_selection` varchar(255) DEFAULT NULL, + `units` int unsigned DEFAULT NULL, + `targetgroup_selection` varchar(255) DEFAULT NULL, + `tag_selection` varchar(255) DEFAULT NULL, + `hotspots_selection` varchar(255) DEFAULT NULL, + `searchstring` varchar(255) DEFAULT NULL, + `sentiment` int unsigned DEFAULT NULL, + `tagcloud_size` int unsigned DEFAULT NULL, + `hotspot_size` int unsigned DEFAULT NULL, + `time_range` int unsigned DEFAULT NULL, + `id` int unsigned NOT NULL AUTO_INCREMENT, + `restrict_to` varchar(255) DEFAULT NULL, + `country_selection` text DEFAULT NULL, + `black_list` varchar(255) DEFAULT NULL, + `white_list` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `unique name` (`user_id`,`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_group`; + CREATE TABLE `user_group` ( + `user_id` int NOT NULL, + `group_id` int NOT NULL, + PRIMARY KEY (`user_id`,`group_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_rights`; + CREATE TABLE `user_rights` ( + `user_id` int NOT NULL, + `right_id` varchar(45) NOT NULL, + `read` tinyint DEFAULT NULL, + `write` tinyint DEFAULT NULL, + PRIMARY KEY (`user_id`,`right_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_role`; + CREATE TABLE `user_role` ( + `user_id` int NOT NULL, + `role_id` int NOT NULL, + PRIMARY KEY (`user_id`,`role_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `user_settings`; + CREATE TABLE `user_settings` ( + `user_id` int NOT NULL, + `context` varchar(40) NOT NULL, + `key` varchar(150) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`user_id`,`context`,`key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `users`; + CREATE TABLE `users` ( + `id` int NOT NULL AUTO_INCREMENT, + `username` varchar(45) NOT NULL, + `password` varchar(80) NOT NULL, + `password_updated_at` date DEFAULT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `email` varchar(255) NOT NULL, + `comment` varchar(255) DEFAULT NULL, + `language_id` int NOT NULL DEFAULT 0, + `role_id` int NOT NULL DEFAULT 0, + `group_id` int NOT NULL DEFAULT 0, + `noiprestriction` tinyint unsigned DEFAULT 0, + `temporary` tinyint NOT NULL DEFAULT 0, + `invisible` tinyint NOT NULL DEFAULT 0 COMMENT 'if enabled, account will only be visible to root.', + `creationDate` datetime NOT NULL DEFAULT '1970-01-01 00:00:00', + `expires` date NOT NULL DEFAULT '1970-01-01', + `default_view` int NOT NULL DEFAULT 0, + `customer_id` int DEFAULT NULL, + `created_by` int DEFAULT NULL, + `external_user_id` varchar(45) DEFAULT NULL, + `client_id` varchar(45) DEFAULT NULL, + `external_password` varchar(45) DEFAULT NULL, + `wt_alerting_interval` enum('no_alerting','immediately','daily','weekly','monthly') NOT NULL DEFAULT 'daily', + `user_language_id` tinyint unsigned NOT NULL DEFAULT 0, + `user_country_id` tinyint unsigned NOT NULL DEFAULT 0, + `inactive` tinyint NOT NULL DEFAULT 0, + `failed_login_attempts` tinyint NOT NULL DEFAULT 0, + `last_login_at` date DEFAULT NULL, + `account_unlock_hash` varchar(256) DEFAULT NULL, + `time_zone_id` varchar(50) NOT NULL DEFAULT 'Europe/Berlin', + `deleted` tinyint NOT NULL DEFAULT 0, + `expiration_email_sent` tinyint NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `UniqueUser` (`username`), + KEY `fk_role_id` (`role_id`), + KEY `fk_group_id` (`group_id`), + KEY `fk_language_id` (`language_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alert_addresses`; + CREATE TABLE `web_alert_addresses` ( + `alert_id` int NOT NULL, + `addresses_id` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`alert_id`,`pos`), + KEY `FK_jk3elndhs23jb1ssayrbt95rs` (`alert_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alerts`; + CREATE TABLE `web_alerts` ( + `id` int NOT NULL AUTO_INCREMENT, + `alert_id` int DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `seen_date` datetime DEFAULT NULL, + `sent_date` datetime DEFAULT NULL, + `sentiment` int DEFAULT NULL, + `timespan` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + `volume` int DEFAULT NULL, + `filter_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_p4vhrott3eb00ruwx5bx8w0kn` (`alert_id`), + KEY `FK_ocndji27hgx9l8wlwu1pcrhe3` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `web_alerts_stream`; + CREATE TABLE `web_alerts_stream` ( + `id` int NOT NULL AUTO_INCREMENT, + `comment` varchar(255) DEFAULT NULL, + `duplicate_mode` int NOT NULL, + `interval_ms` bigint NOT NULL, + `priority` tinyint unsigned NOT NULL DEFAULT 0, + `last_alert` datetime DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `user_id` int NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alerts_stream_conds`; + CREATE TABLE `web_alerts_stream_conds` ( + `discriminator` varchar(4) NOT NULL, + `id` bigint NOT NULL AUTO_INCREMENT, + `description` varchar(255) DEFAULT NULL, + `value` varchar(255) DEFAULT NULL, + `inverted` tinyint unsigned NOT NULL DEFAULT 0, + `alert_stream_id` int DEFAULT NULL, + `pos` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK8m0p8mpta3c2l1wu9v7f5hfrg` (`alert_stream_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alerts_stream_config`; + CREATE TABLE `web_alerts_stream_config` ( + `id` int NOT NULL AUTO_INCREMENT, + `type` varchar(255) DEFAULT NULL, + `alert_stream_id` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK5uoa6o4i9ucntbwm8g5haiyw` (`alert_stream_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alerts_stream_config_params`; + CREATE TABLE `web_alerts_stream_config_params` ( + `alert_config_id` int NOT NULL, + `params` varchar(255) DEFAULT NULL, + `params_key` varchar(100) NOT NULL, + PRIMARY KEY (`alert_config_id`,`params_key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_alerts_stream_incident`; + CREATE TABLE `web_alerts_stream_incident` ( + `incident_id` varchar(36) NOT NULL, + `stream_id` int NOT NULL, + `serialized_incident` longblob DEFAULT NULL, + `triggered_at` datetime DEFAULT NULL, + PRIMARY KEY (`incident_id`,`stream_id`), + KEY `stream_id_triggered_at` (`stream_id`,`triggered_at`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_archive_customer_configuration`; + CREATE TABLE `web_archive_customer_configuration` ( + `id` int NOT NULL AUTO_INCREMENT, + `creation_date` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `finished_date` datetime DEFAULT NULL, + `state` int DEFAULT NULL, + `user_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + # DROP TABLE IF EXISTS TABLE `web_block_the_edit`; + # CREATE TABLE `web_block_the_edit` ( + # `id` bigint NOT NULL AUTO_INCREMENT, + # `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + # `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + # `creator_id` bigint DEFAULT NULL, + # `customer_id` int DEFAULT NULL, + # `document_guid` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + # PRIMARY KEY (`id`) + # ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + + DROP TABLE IF EXISTS `web_customer_export_template`; + CREATE TABLE `web_customer_export_template` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `template` longblob NOT NULL, + `template_name` varchar(255) DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_customer_image_upload`; + CREATE TABLE `web_customer_image_upload` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int NOT NULL, + `image` longblob DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_customer_mail_templates`; + CREATE TABLE `web_customer_mail_templates` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `contents` longtext DEFAULT NULL, + `customer_id` int NOT NULL, + `locale_code` varchar(255) NOT NULL, + `type` int NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_dashboards`; + CREATE TABLE `web_dashboards` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `position` int DEFAULT NULL, + `perspective_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_rv3rl39evi906xi4x7lqow5gn` (`perspective_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_download_file`; + CREATE TABLE `web_download_file` ( + `file_identifier` varchar(125) NOT NULL, + `creation_at` timestamp NOT NULL DEFAULT current_timestamp(), + `file_path` varchar(255) DEFAULT NULL, + `last_downloaded_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`file_identifier`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates`; + CREATE TABLE `web_export_templates` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `template` longblob NOT NULL, + `title_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_g05s3ucxbeor3nuqy85wkbe6a` (`title_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_customer`; + # InnoDB change: Added primary key + CREATE TABLE `web_export_templates_customer` ( + `template_id` bigint NOT NULL, + `customer_id` int NOT NULL, + KEY `FK_df226qn8ks5vm5dumt4w4udoi` (`template_id`), + PRIMARY KEY (`template_id`,`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_reports`; + CREATE TABLE `web_export_templates_reports` ( + `template_id` bigint DEFAULT NULL, + `report_id` bigint NOT NULL, + PRIMARY KEY (`report_id`), + KEY `FK_7viucrwq64gu0qhnrtvx4rfev` (`template_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_text`; + CREATE TABLE `web_export_templates_text` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `default_text` varchar(255) DEFAULT NULL, + `identifier` varchar(255) DEFAULT NULL, + `label` varchar(255) DEFAULT NULL, + `max_length` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_text_value`; + CREATE TABLE `web_export_templates_text_value` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `value` varchar(255) DEFAULT NULL, + `text_id` bigint DEFAULT NULL, + `report_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_77reriydhr901v13unt2pryau` (`text_id`), + KEY `FK_l70f95cr5c1je27my7y625ie1` (`report_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_texts`; + CREATE TABLE `web_export_templates_texts` ( + `template_id` bigint NOT NULL, + `text_id` bigint NOT NULL, + PRIMARY KEY (`template_id`,`text_id`), + UNIQUE KEY `UK_95nadde4fled9wl3gw3usa8n` (`text_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_export_templates_widgets`; + CREATE TABLE `web_export_templates_widgets` ( + `template_id` bigint DEFAULT NULL, + `widget_id` bigint DEFAULT NULL, + `id` bigint NOT NULL AUTO_INCREMENT, + `number_on_slide` int DEFAULT NULL, + `slide` int NOT NULL, + `title_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_4cpxdsw9bgv5e1i0t9uag1n1` (`widget_id`), + KEY `FK_85wnuiiqdwgfevkh7yt07bhpu` (`title_id`), + KEY `template_id` (`template_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_attribute_type_ids`; + CREATE TABLE `web_filter_attribute_type_ids` ( + `filter_id` bigint NOT NULL, + `attribute_type_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_authors`; + CREATE TABLE `web_filter_authors` ( + `filter_id` bigint NOT NULL, + `author_guid` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_7tbrdga27ergv073s9jvhv9cj` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_black_lists`; + CREATE TABLE `web_filter_black_lists` ( + `filter_id` bigint NOT NULL, + `list_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_kbbtnu9txy7uw7i8spo6qmgtv` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_countries`; + CREATE TABLE `web_filter_countries` ( + `filter_id` bigint NOT NULL, + `country_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_k190kisashhgd2ttn7g0xx7kd` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_crossed_topics`; + CREATE TABLE `web_filter_crossed_topics` ( + `filter_id` bigint NOT NULL, + `node_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_mjvauwbx1t2uapkx1jkw7su65` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_doc_types`; + CREATE TABLE `web_filter_doc_types` ( + `filter_id` bigint NOT NULL, + `docType_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_genders`; + CREATE TABLE `web_filter_genders` ( + `filter_id` bigint NOT NULL, + `gender_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_languages`; + CREATE TABLE `web_filter_languages` ( + `filter_id` bigint NOT NULL, + `language_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_f9mkaq7f52xg1ql60pm76ymnn` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_market_price_classes`; + CREATE TABLE `web_filter_market_price_classes` ( + `filter_id` bigint NOT NULL, + `price_class_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_named_entities`; + CREATE TABLE `web_filter_named_entities` ( + `filter_id` bigint NOT NULL, + `named_entity_id` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_1r50ukll4xdeoij5dr4yfipxd` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_nodes`; + CREATE TABLE `web_filter_nodes` ( + `filter_id` bigint NOT NULL, + `node_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_afrlfiui2kute4w50ifa8iuyn` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_post_comment_state`; + CREATE TABLE `web_filter_post_comment_state` ( + `filter_id` bigint NOT NULL, + `post_comment_state` varchar(256) NOT NULL DEFAULT '', + `pos` int NOT NULL DEFAULT 0, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_product`; + CREATE TABLE `web_filter_product` ( + `filter_id` bigint NOT NULL, + `product_id` varchar(36) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_qvbryt0tr40gvs7cysth6vy7c` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_product_category_ids`; + CREATE TABLE `web_filter_product_category_ids` ( + `filter_id` bigint NOT NULL, + `category_id` int DEFAULT NULL, + `hierachy_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_ratings`; + CREATE TABLE `web_filter_ratings` ( + `filter_id` bigint NOT NULL, + `rating_id` double DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_9d0mhx04hhij8rylu5jv1s5wf` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_sentiments`; + CREATE TABLE `web_filter_sentiments` ( + `filter_id` bigint NOT NULL, + `sentiment_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_q6iv3olweequ4uul7c46o16it` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_sort_field`; + CREATE TABLE `web_filter_sort_field` ( + `filter_id` bigint NOT NULL, + `sort_field` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_sort_fields`; + CREATE TABLE `web_filter_sort_fields` ( + `filter_id` bigint NOT NULL, + `sort_param_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_1jx47ewaorxfs9wjsnk2tsvmt` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_source_types`; + CREATE TABLE `web_filter_source_types` ( + `filter_id` bigint NOT NULL, + `source_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_bd44duosn9y9lm946dgjiu4nv` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_sources`; + CREATE TABLE `web_filter_sources` ( + `filter_id` bigint NOT NULL, + `source_guid` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_qcg0ak6y3m6h0gb9fdd157e72` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_tags`; + CREATE TABLE `web_filter_tags` ( + `filter_id` bigint NOT NULL, + `tag` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_td2et85u5ddwh874v0u5dnxd5` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filter_white_lists`; + CREATE TABLE `web_filter_white_lists` ( + `filter_id` bigint NOT NULL, + `list_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`filter_id`,`pos`), + KEY `FK_28ji5t5kyl77tb5tatkr1kr47` (`filter_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_filters`; + CREATE TABLE `web_filters` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `content_length_from` int DEFAULT NULL, + `content_length_to` int DEFAULT NULL, + `date_field` varchar(255) DEFAULT NULL, + `date_offset_amount` int DEFAULT NULL, + `date_offset_part` varchar(255) DEFAULT NULL, + `date_range_amount` int DEFAULT NULL, + `date_range_part` varchar(255) DEFAULT NULL, + `dopaEntityType` int DEFAULT NULL, + `end` datetime DEFAULT NULL, + `follower_count_from` bigint DEFAULT NULL, + `follower_count_to` bigint DEFAULT NULL, + `important_status` int DEFAULT NULL, + `is_comment` tinyint DEFAULT NULL, + `is_shared` tinyint DEFAULT NULL, + `likes_count_from` int DEFAULT NULL, + `likes_count_to` int DEFAULT NULL, + `comments_count_from` int DEFAULT NULL, + `comments_count_to` int DEFAULT NULL, + `offset` int DEFAULT NULL, + `post_count_from` bigint DEFAULT NULL, + `post_count_to` bigint DEFAULT NULL, + `read_status` int DEFAULT NULL, + `relevant` int DEFAULT NULL, + `search_string` text DEFAULT NULL, + `sentiment_type` int DEFAULT NULL, + `shared_count_from` int DEFAULT NULL, + `shared_count_to` int DEFAULT NULL, + `size` int DEFAULT NULL, + `sort_field` int DEFAULT NULL, + `sort_order` int DEFAULT NULL, + `start` datetime DEFAULT NULL, + `tagCloudTrendType` varchar(255) DEFAULT NULL, + `tag_cloud` int DEFAULT NULL, + `unit_id` int DEFAULT NULL, + `view_count_from` bigint DEFAULT NULL, + `view_count_to` bigint DEFAULT NULL, + `eventUri` bigint DEFAULT NULL, + `attributes` longtext DEFAULT NULL, + `min_reviews_count` int DEFAULT NULL, + `breakdownSize` int DEFAULT NULL, + `lat_lower_left` double DEFAULT NULL, + `lat_upper_right` double DEFAULT NULL, + `lon_lower_left` double DEFAULT NULL, + `lon_upper_right` double DEFAULT NULL, + `sample_date` bigint DEFAULT NULL, + `sample_size` int DEFAULT NULL, + `post_comment_state` int DEFAULT NULL, + `post_comment_state_custom` varchar(256) DEFAULT NULL, + `has_post_comment` tinyint DEFAULT NULL, + `include_related_data` tinyint NOT NULL DEFAULT 0, + `show_all` tinyint NOT NULL DEFAULT 0, + `product_rating_from` double DEFAULT NULL, + `product_rating_to` double DEFAULT NULL, + `apply_to_life_time_rating` tinyint NOT NULL DEFAULT 0, + `asin` varchar(255) DEFAULT NULL, + `ean` varchar(255) DEFAULT NULL, + `customFields` longtext DEFAULT NULL, + `negative_filter_id` bigint DEFAULT NULL, + `filter_role_id` bigint DEFAULT NULL, + `role_filter_type` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_web_filters_negative_filter_id` (`negative_filter_id`), + CONSTRAINT `fk_web_filters_negative_filter_id` FOREIGN KEY (`negative_filter_id`) REFERENCES `web_filters` (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_flags`; + CREATE TABLE `web_flags` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `flag_series_id` bigint NOT NULL, + `is_shared` tinyint NOT NULL, + `text` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `x` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_flagseries`; + CREATE TABLE `web_flagseries` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `series_id` int DEFAULT NULL, + `filter_id` bigint DEFAULT NULL, + `settings_id` bigint DEFAULT NULL, + `is_shared` bit(1) NOT NULL, + `text` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `x` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_5d9jsa6mdb3hi5nnoqiob1k6n` (`filter_id`), + KEY `FK_r07puuf550m2mdiepwudfehfn` (`settings_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_health_taskinfo`; + CREATE TABLE `web_health_taskinfo` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `customer_id` int DEFAULT NULL, + `elapsed_ms` bigint DEFAULT NULL, + `now` datetime DEFAULT NULL, + `stacktrace` longtext DEFAULT NULL, + `start` datetime DEFAULT NULL, + `state` varchar(255) DEFAULT NULL, + `task_class` varchar(255) DEFAULT NULL, + `task_info` longtext DEFAULT NULL, + `user_id` int DEFAULT NULL, + `uuid` varchar(36) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `uuid` (`uuid`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_kpi_customer_configuration`; + CREATE TABLE `web_kpi_customer_configuration` ( + `id` int NOT NULL AUTO_INCREMENT, + `creation_date` datetime DEFAULT NULL, + `current_version` int DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `last_finished_date` datetime DEFAULT NULL, + `last_start_date` datetime DEFAULT NULL, + `project_id` int DEFAULT NULL, + `schema_class` varchar(255) DEFAULT NULL, + `shop_id` int DEFAULT NULL, + `shop_url` varchar(255) DEFAULT NULL, + `state` enum('MODIFIED','RUNNING','ERROR','SUCCESS','DISABLED') DEFAULT NULL, + `strict_kpis` tinyint DEFAULT 1, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_label_nodes`; + CREATE TABLE `web_label_nodes` ( + `label_id` bigint NOT NULL, + `node_id` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`label_id`,`pos`), + KEY `FK_t9dgy6ieo9ycy9uetnqadrivx` (`label_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_label_perspectives`; + CREATE TABLE `web_label_perspectives` ( + `label_id` bigint NOT NULL, + `perspective_id` bigint DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`label_id`,`pos`), + KEY `FK_qe3640t7w66ywe54gurpemwe8` (`label_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_labels`; + CREATE TABLE `web_labels` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `web_perspectives`; + CREATE TABLE `web_perspectives` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `is_global_template` tinyint NOT NULL DEFAULT 0, + `is_accessible_by_link` tinyint DEFAULT 0, + `is_default` tinyint DEFAULT 0, + `selected_dashboard_index` int DEFAULT NULL, + `is_new_date` timestamp NULL DEFAULT NULL, + `is_template` tinyint DEFAULT NULL, + `filter_id` bigint DEFAULT NULL, + `project_id` bigint DEFAULT NULL, + `made_default_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_kunc8ulh6hquldle1wl5n40hf` (`filter_id`), + KEY `FK_hmdqcx5frpt2lsxikuf5wu8mb` (`project_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_projects`; + CREATE TABLE `web_projects` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `hide` tinyint DEFAULT NULL, + `node_id` int DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_reply_templates`; + CREATE TABLE `web_reply_templates` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` int unsigned NOT NULL, + `title` varchar(255) NOT NULL DEFAULT '', + `content` text NOT NULL, + `creation_date` datetime NOT NULL, + `creation_user_id` int NOT NULL, + `update_date` datetime NOT NULL, + `update_user_id` int NOT NULL, + PRIMARY KEY (`id`), + KEY `customer_id` (`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_reports`; + CREATE TABLE `web_reports` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `doc_list_include_in_email` tinyint DEFAULT NULL, + `doc_list_translate_lang` varchar(10) DEFAULT NULL, + `period` int NOT NULL, + `period_type` varchar(255) DEFAULT NULL, + `real_sent_date` datetime DEFAULT NULL, + `running` tinyint NOT NULL, + `sent_date` datetime DEFAULT NULL, + `start_date` datetime DEFAULT NULL, + `dashboard_id` bigint DEFAULT NULL, + `filter_id` bigint DEFAULT NULL, + `widget_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_1q8fdlsnjrokpp41rds8ccrkn` (`dashboard_id`), + KEY `FK_7clyen47i5vtds3iot5nusfsd` (`filter_id`), + KEY `FK_aacjujuathr7r5ofkt5hs5ocs` (`widget_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_reports_addresses`; + CREATE TABLE `web_reports_addresses` ( + `report_id` bigint NOT NULL, + `address` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`report_id`,`pos`), + KEY `FK_9l27d4xd96xtqekdgydt1nrfj` (`report_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_reports_formats`; + CREATE TABLE `web_reports_formats` ( + `report_id` bigint NOT NULL, + `format` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`report_id`,`pos`), + KEY `FK_66dhojw22r6gypjla5t1ht19c` (`report_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_reports_widgets_filters`; + CREATE TABLE `web_reports_widgets_filters` ( + `filter_id` bigint NOT NULL, + `report_id` bigint NOT NULL, + `widget_id` bigint NOT NULL, + UNIQUE KEY `UK_hpxwpowq4sb6vcts7a6f33vb5` (`filter_id`), + KEY `FK_h3m1b8qchcjvbl8sm4odujd1` (`report_id`), + KEY `FK_aqahpthl5hd0gavm77jy5h46h` (`widget_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_shared_perspectives`; + CREATE TABLE `web_shared_perspectives` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `group_id` bigint DEFAULT NULL, + `permission` int DEFAULT NULL, + `user_id` bigint DEFAULT NULL, + `perspective_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_oo7x8x69g5x1adbrf3qoo7gsm` (`perspective_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_social_media_channel_token`; + CREATE TABLE `web_social_media_channel_token` ( + `id` int NOT NULL AUTO_INCREMENT, + `token` varchar(255) DEFAULT NULL, + `update_date` timestamp NULL DEFAULT NULL, + `external_user_id` varchar(50) DEFAULT NULL, + `granted_scopes` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_social_media_user_token`; + CREATE TABLE `web_social_media_user_token` ( + `id` int NOT NULL AUTO_INCREMENT, + `customer_id` int NOT NULL, + `token` varchar(255) DEFAULT NULL, + `update_date` timestamp NULL DEFAULT NULL, + `update_user_id` int DEFAULT NULL, + `external_user_name` varchar(150) DEFAULT NULL, + `external_user_id` varchar(50) DEFAULT NULL, + `granted_scopes` varchar(255) DEFAULT NULL, + `source_guid` char(36) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_themes`; + CREATE TABLE `web_themes` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `chart_colors` varchar(500) NOT NULL, + `customer_id` int DEFAULT NULL, + `dark_complement_color` varchar(7) DEFAULT NULL, + `header_color` varchar(7) DEFAULT NULL, + `header_font_color` varchar(7) DEFAULT NULL, + `header_font_size` int DEFAULT NULL, + `light_complement_color` varchar(7) DEFAULT NULL, + `primary_main_color` varchar(7) DEFAULT NULL, + `secondary_main_color` varchar(7) DEFAULT NULL, + `is_template` tinyint DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_user_annotation_context`; + CREATE TABLE `web_user_annotation_context` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `type` int DEFAULT NULL, + `value` varchar(60) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_bmcigqxjs9fxhlpcjx1m755qg` (`type`,`value`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_user_annotation_entry`; + CREATE TABLE `web_user_annotation_entry` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `document_guid` varchar(40) NOT NULL, + `important` tinyint DEFAULT NULL, + `irrelevant` tinyint DEFAULT NULL, + `language_id` int NOT NULL, + `docRead` tinyint DEFAULT NULL, + `sentiment` int DEFAULT NULL, + `topic` tinyint DEFAULT NULL, + `country_id` int DEFAULT NULL, + `updated_at` datetime DEFAULT NULL, + `updater_id` bigint NOT NULL, + `contextEntry_id` bigint DEFAULT NULL, + `updater_customer_id` int DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_c2800uyt8ee5be50idukdkv1g` (`document_guid`,`contextEntry_id`), + KEY `FK_a19kvykvtcbh3bw2jtgw9kjov` (`contextEntry_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_user_project`; + CREATE TABLE `web_user_project` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `project_id` bigint DEFAULT NULL, + `user_id` int NOT NULL, + `customer_id` int DEFAULT NULL, + `perspective_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_web_user_project_perspective_id` (`perspective_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `web_webdashboard_containers`; + CREATE TABLE `web_webdashboard_containers` ( + `webdashboard_id` bigint NOT NULL, + `value` mediumtext DEFAULT NULL, + `name` varchar(50) NOT NULL, + PRIMARY KEY (`webdashboard_id`,`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_webdashboard_links`; + CREATE TABLE `web_webdashboard_links` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `dashboard_id` bigint DEFAULT NULL, + `perspective_id` bigint DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_webdashboard_webdashboard_links`; + CREATE TABLE `web_webdashboard_webdashboard_links` ( + `webdashboard_id` bigint NOT NULL, + `webdashboard_link_id` bigint NOT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`webdashboard_id`,`pos`), + UNIQUE KEY `UK_76mpuo9whls9h4g96oyi7wgbd` (`webdashboard_link_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_webdashboards`; + CREATE TABLE `web_webdashboards` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `customer_id` int DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_webpage_entry`; + CREATE TABLE `web_webpage_entry` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `customer_id` int DEFAULT NULL, + `failed_reason` text DEFAULT NULL, + `failed_requests` tinyint DEFAULT NULL, + `hash` char(32) DEFAULT NULL, + `last_checked` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00', + `state` enum('NEW','FAILED','SUCCESS') NOT NULL DEFAULT 'NEW', + `token_name` varchar(32) DEFAULT NULL, + `url` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UK_kside0ny7k00xebg0xis5sxwq` (`hash`), + KEY `hash_index` (`hash`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_color_settings`; + CREATE TABLE `web_widget_color_settings` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `colors` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_settings`; + CREATE TABLE `web_widget_settings` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `aggregation_type` int DEFAULT NULL, + `alternative_image` longblob DEFAULT NULL, + `breakdown` varchar(255) DEFAULT NULL, + `breakdown_right` varchar(255) DEFAULT NULL, + `feed_based_export` tinyint DEFAULT NULL, + `notes_visible` tinyint DEFAULT NULL, + `polar` tinyint DEFAULT NULL, + `posts_per_page` int DEFAULT NULL, + `stacking` varchar(255) DEFAULT NULL, + `trend_aggregation_type` int DEFAULT NULL, + `type` varchar(255) DEFAULT NULL, + `update_interval` int DEFAULT NULL, + `x_axis` varchar(255) DEFAULT NULL, + `y_axis` varchar(255) DEFAULT NULL, + `y_axis_right` varchar(255) DEFAULT NULL, + `colorSettings_id` bigint DEFAULT NULL, + `widget_logo` mediumblob DEFAULT NULL, + `visualization` varchar(255) DEFAULT NULL, + `custom_columns_export` bit(1) DEFAULT NULL, + `x_axis_max` int DEFAULT NULL, + `y_axis_interval` varchar(255) DEFAULT NULL, + `y_axis_interval_right` varchar(255) DEFAULT NULL, + `y_axis_max` varchar(255) DEFAULT NULL, + `y_axis_max_right` varchar(255) DEFAULT NULL, + `y_axis_min` varchar(255) DEFAULT NULL, + `y_axis_min_right` varchar(255) DEFAULT NULL, + `social_metric_id` int DEFAULT NULL, + `include_related_data` tinyint NOT NULL DEFAULT 0, + `video_url` varchar(2083) DEFAULT NULL, + `autoplay` tinyint NOT NULL DEFAULT 0, + `mute` tinyint NOT NULL DEFAULT 0, + `loop_video` tinyint NOT NULL DEFAULT 0, + `showOnlyAttributesFromFilter` tinyint NOT NULL DEFAULT 0, + `resolveProductCategoriesToLeaves` tinyint NOT NULL DEFAULT 0, + `attributeValueType` varchar(256) DEFAULT NULL, + `show_all` tinyint NOT NULL DEFAULT 0, + `chart_widget_sorting_option` enum('Y_AXIS_LEFT_ASC','Y_AXIS_LEFT_DESC','Y_AXIS_RIGHT_ASC','Y_AXIS_RIGHT_DESC','X_AXIS_ASC','X_AXIS_DESC') DEFAULT NULL, + `remove_zero_categories` tinyint DEFAULT 0, + `sound` tinyint NOT NULL DEFAULT 0, + `tag_cloud_target_lang` varchar(2) DEFAULT NULL, + `data_label_option` enum('NONE','PERCENTAGE','ABSOLUTE') DEFAULT 'NONE', + `legacy_export` tinyint DEFAULT NULL, + `y_axis_threshold` double DEFAULT NULL, + `y_axis_threshold_right` double DEFAULT NULL, + `resolve_depth` tinyint NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `FK_1luqlq97o927tn6hv4aqpnhut` (`colorSettings_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_settings_post_columns`; + CREATE TABLE `web_widget_settings_post_columns` ( + `settings_id` bigint NOT NULL, + `post_column` int DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`settings_id`,`pos`), + KEY `FK_kubqs1mfd3aubxry8s4oylo8h` (`settings_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_settings_visible_columns`; + CREATE TABLE `web_widget_settings_visible_columns` ( + `settings_id` bigint NOT NULL, + `visible_column` varchar(255) DEFAULT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`settings_id`,`pos`), + KEY `FK_8ptimqcsec0yexr0txl2etxj0` (`settings_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_template_categories`; + CREATE TABLE `web_widget_template_categories` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `iconName` varchar(255) DEFAULT NULL, + `is_active` tinyint NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_template_categories_widgets`; + CREATE TABLE `web_widget_template_categories_widgets` ( + `widget_template_category_id` bigint NOT NULL, + `widget_id` bigint NOT NULL, + `pos` int NOT NULL, + PRIMARY KEY (`widget_template_category_id`,`pos`), + UNIQUE KEY `unique_ids` (`widget_template_category_id`,`widget_id`), + KEY `FK_j1mksd6uwr5hh3gw8kuktf494` (`widget_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widget_views`; + CREATE TABLE `web_widget_views` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `end_point` varchar(255) DEFAULT NULL, + `export_template` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `web_widgets`; + CREATE TABLE `web_widgets` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `creator_id` bigint DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `posted_at` datetime DEFAULT NULL, + `grid_column` int DEFAULT NULL, + `custom_url` varchar(255) DEFAULT NULL, + `customer_id` int DEFAULT NULL, + `order_number` int DEFAULT NULL, + `grid_row` int DEFAULT NULL, + `size_x` int DEFAULT NULL, + `size_y` int DEFAULT NULL, + `is_template` tinyint DEFAULT NULL, + `text` text DEFAULT NULL, + `category_id` bigint DEFAULT NULL, + `dashboard_id` bigint DEFAULT NULL, + `filter_id` bigint DEFAULT NULL, + `widget_settings_id` bigint DEFAULT NULL, + `widget_view_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_5pj0t64qvtf5lxd5gtsxrk7o` (`category_id`), + KEY `FK_fe11vr86ybchdtq3dpm5u19yd` (`dashboard_id`), + KEY `FK_au6vqn9yt63dni8cpk7k0bstj` (`filter_id`), + KEY `FK_dg3u1i17ikuj9lcq1a3mvssln` (`widget_settings_id`), + KEY `FK_dfsxja2r7g0au7ubq48ux43wc` (`widget_view_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `webpage_tracking_alerting`; + CREATE TABLE `webpage_tracking_alerting` ( + `webpage_id` int unsigned NOT NULL, + `permission_id` int unsigned NOT NULL, + `permission_type` enum('user','group','role') NOT NULL, + `alert_interval` enum('immediately','daily','weekly','monthly') NOT NULL DEFAULT 'daily', + UNIQUE KEY `webpage_id_permission_id_permission_type` (`webpage_id`,`permission_id`,`permission_type`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_category`; + CREATE TABLE `webpage_tracking_category` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `creation_user_id` int DEFAULT NULL, + `creation_date` timestamp NOT NULL DEFAULT current_timestamp(), + `customer_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_customer_id` (`name`,`customer_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_localization`; + CREATE TABLE `webpage_tracking_localization` ( + `name` varchar(255) NOT NULL, + `value` mediumtext NOT NULL, + UNIQUE KEY `name` (`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_mailing`; + # InnoDB change: Added primary key + CREATE TABLE `webpage_tracking_mailing` ( + `webpage_id` int unsigned NOT NULL, + `version` int unsigned NOT NULL, + `user_id` int unsigned NOT NULL, + `date` datetime DEFAULT NULL, + `sent` datetime DEFAULT NULL, + `alerting_interval` enum('immediately','daily','weekly','monthly') NOT NULL DEFAULT 'immediately', + PRIMARY KEY (`webpage_id`,`version`,`user_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_permission`; + CREATE TABLE `webpage_tracking_permission` ( + `webpage_id` int unsigned NOT NULL, + `permission_id` int unsigned NOT NULL, + `permission_type` enum('user','group','role','customer') NOT NULL, + UNIQUE KEY `webpage_id_group_id_permission_type` (`webpage_id`,`permission_id`,`permission_type`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_request`; + CREATE TABLE `webpage_tracking_request` ( + `webpage_id` int unsigned NOT NULL, + `day` date NOT NULL, + `requests` int unsigned NOT NULL, + UNIQUE KEY `webpage_id_day` (`webpage_id`,`day`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_topic`; + CREATE TABLE `webpage_tracking_topic` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `creation_user_id` int DEFAULT NULL, + `creation_date` timestamp NOT NULL DEFAULT current_timestamp(), + `customer_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_webpage`; + CREATE TABLE `webpage_tracking_webpage` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `url` text NOT NULL, + `title` text DEFAULT NULL, + `language_id` tinyint unsigned NOT NULL, + `category_id` int unsigned NOT NULL, + `topic_id` int unsigned NOT NULL DEFAULT 0, + `comment` text DEFAULT NULL, + `active` tinyint unsigned NOT NULL DEFAULT 1, + `top_site` tinyint unsigned NOT NULL DEFAULT 0, + `alerting` tinyint unsigned NOT NULL DEFAULT 0, + `update_interval_s` int unsigned NOT NULL DEFAULT 3600, + `lastchecked` datetime NOT NULL DEFAULT '1970-01-01 00:00:00', + `failed_requests` int unsigned NOT NULL DEFAULT 0, + `failure_reason` text DEFAULT NULL, + `custom_title` varchar(255) DEFAULT NULL, + `encoding` enum('UTF-8','ISO-8859-1','windows-1251') DEFAULT NULL, + `creation_user_id` int DEFAULT NULL, + `creation_date` timestamp NOT NULL DEFAULT current_timestamp(), + `customer_id` int unsigned DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + DROP TABLE IF EXISTS `webpage_tracking_webpage_content`; + CREATE TABLE `webpage_tracking_webpage_content` ( + `version_id` int unsigned NOT NULL, + `content` mediumtext DEFAULT NULL, + `delta` mediumtext DEFAULT NULL, + UNIQUE KEY `version_id` (`version_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + DROP TABLE IF EXISTS `webpage_tracking_webpage_version`; + CREATE TABLE `webpage_tracking_webpage_version` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `webpage_id` int unsigned NOT NULL, + `mimetype` varchar(255) NOT NULL, + `is_text` tinyint unsigned NOT NULL, + `version` int unsigned NOT NULL, + `date` datetime NOT NULL, + `size` bigint unsigned NOT NULL, + `title` text DEFAULT NULL, + `is_read` tinyint unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `page_id_version` (`webpage_id`,`version`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + + + ``` +- ``` + mysqldump -u vicoroot -p -n -t -h 10.23.22.70 --databases monitoring --tables alert > station-dev-001_data.sql< + mysqldump -u vicoroot -f -p -n -t --complete-insert -h 10.23.22.188 --databases monitoring --tables alert alert_logging alexa api_key_mapping api_rate_limit_bucket_configuration author_review_metadata auto_reports_feeds_data auto_reports_hashtag_data auto_reports_tags_data base_hierarchy_id blacklist_author blacklist_channel blacklist_phrase blacklist_source blacklist_sourcename blacklist_url blacklist_url category configuration customer customer_metadata customer_productkpidata dashboard_channel dashboard_view dashboard_view_node dashboard_view_node_category dashboard_view_node_category_topic dashboard_view_node_channel dashboard_view_node_custom_query dashboard_view_node_customer_product dashboard_view_node_entity dashboard_view_node_product_category dashboard_view_node_query entry_editorial filter_alias filter_keywords filter_list group group_customer group_project indexer_parameters language list_author list_document list_source log_customer log_macro log_node log_product_category log_query log_report macro macro_category market_price_class node_sentiment_model node_sentimentquery oauth_access_token oauth_client_details pricing_customer_booking pricing_customer_price pricing_customer_volume pricing_feature pricing_feed_volume pricing_package pricing_package_feature product_reference_price rate_limit_configuration rights role role_grant_role role_rights scheduled_export_task searchterm_management_log sentiment_model_trials sentiment_models sentimentquery service_entry shared_clipboard source sourceset sourceset_subselection sourceset_types source_category station_annotator_errors statistics_user_action stopwords stored_searches synonym_tagcloud_tokens synonym_tagcloud_variants topic topicmodel topicmodel_node topicmodel_topic topicstopwords user_abo user_alert user_annotations user_filters user_group user_rights user_role user_settings users web_alert_addresses web_alerts web_alerts_stream web_alerts_stream_conds web_alerts_stream_config web_alerts_stream_config_params web_alerts_stream_incident web_archive_customer_configuration web_customer_export_template web_customer_image_upload web_customer_mail_templates web_dashboards web_download_file web_export_templates web_export_templates_customer web_export_templates_reports web_export_templates_text web_export_templates_text_value web_export_templates_texts web_export_templates_widgets web_filter_attribute_type_ids web_filter_authors web_filter_black_lists web_filter_categories web_filter_countries web_filter_crossed_topics web_filter_data_providers web_filter_doc_types web_filter_genders web_filter_languages web_filter_market_price_classes web_filter_named_entities web_filter_nodes web_filter_post_comment_state web_filter_product web_filter_product_category_ids web_filter_product_sub_category_ids web_filter_ratings web_filter_sentiments web_filter_sort_field web_filter_sort_fields web_filter_source_types web_filter_sources web_filter_tags web_filter_topics web_filter_white_lists web_filters web_flags web_flagseries web_health_taskinfo web_kpi_customer_configuration web_label_nodes web_label_perspectives web_labels web_perspectives web_projects web_reply_templates web_reports web_reports_addresses web_reports_formats web_reports_widgets_filters web_shared_perspectives web_social_media_channel_token web_social_media_user_token web_themes web_user_annotation_context web_user_annotation_entry web_user_project web_webdashboard_containers web_webdashboard_links web_webdashboard_webdashboard_links web_webdashboards web_webpage_entry web_widget_color_settings web_widget_settings web_widget_settings_post_columns web_widget_settings_visible_columns web_widget_template_categories web_widget_template_categories_widgets web_widget_views web_widgets webpage_tracking_alerting webpage_tracking_category webpage_tracking_localization webpage_tracking_mailing webpage_tracking_permission webpage_tracking_request webpage_tracking_topic webpage_tracking_webpage webpage_tracking_webpage_content webpage_tracking_webpage_version > station-bpt_data_small.sql + + + mysqldump -u vicoroot -f -pSohquai2 -n -t --complete-insert -h 10.23.22.188 --databases monitoring --tables author > station-bpt_author.sql + | mysql -f -h mysql-001.va.k8s-c1.vicosrv.de monitoring_808 -u root -paEer§$jgh0!. + + cat station-bpt_data_small.sql | mysql -u root -p -f -h mysql-001.va.k8s-c1.vicosrv.de monitoring_814 + + mysqldump -u vicoroot -f -pSohquai2 -n -t --complete-insert -h 10.23.22.188 --databases monitoring --tables author > station-bpt_author.sql + cat station-bpt_author.sql | mysql -u root -p -f -h mysql-001.va.k8s-c1.vicosrv.de monitoring_808 + + mysqldump -u vicoroot -f -pSohquai2 -n -t --complete-insert -h 10.23.22.188 --databases monitoring --tables thread > station-bpt_thread.sql + cat station-bpt_thread.sql | mysql -u root -p -f -h mysql-001.va.k8s-c1.vicosrv.de monitoring_808 + + + mysqldump -h source_host -u source_username -pSourcePassword source_database_name --tables table1 table2 | mysql -h destination_host -u destination_username -pDestinationPassword destination_database_name + + mysqldump -u vicoroot -f -p -n -t -h 10.23.22.188 --databases monitoring --routines -d > station_bpt_functions.sql + + + mysqldump -u vicoroot -f -p -n -t --complete-insert -h station-dev-001.vicosrv.de --databases monitoring --tables alert alert_logging alexa api_key_mapping api_rate_limit_bucket_configuration author_review_metadata auto_reports_feeds_data auto_reports_hashtag_data auto_reports_tags_data base_hierarchy_id blacklist_author blacklist_channel blacklist_phrase blacklist_source blacklist_sourcename blacklist_url category configuration customer customer_metadata customer_productkpidata dashboard_channel dashboard_view dashboard_view_node dashboard_view_node_category dashboard_view_node_category_topic dashboard_view_node_channel dashboard_view_node_custom_query dashboard_view_node_customer_product dashboard_view_node_entity dashboard_view_node_product_category dashboard_view_node_query entry_editorial filter_alias filter_keywords filter_list group group_customer group_project indexer_parameters language list_author list_document list_source log_customer log_macro log_node log_product_category log_query log_report macro macro_category market_price_class node_sentiment_model node_sentimentquery oauth_access_token oauth_client_details pricing_customer_booking pricing_customer_price pricing_customer_volume pricing_feature pricing_feed_volume pricing_package pricing_package_feature product_reference_price rate_limit_configuration rights role role_grant_role role_rights scheduled_export_task searchterm_management_log sentiment_model_trials sentiment_models sentimentquery service_entry shared_clipboard source sourceset sourceset_subselection sourceset_types source_category station_annotator_errors statistics_user_action stopwords stored_searches synonym_tagcloud_tokens synonym_tagcloud_variants topic topicmodel topicmodel_node topicmodel_topic topicstopwords user_abo user_alert user_annotations user_filters user_group user_rights user_role user_settings users web_alert_addresses web_alerts web_alerts_stream web_alerts_stream_conds web_alerts_stream_config web_alerts_stream_config_params web_alerts_stream_incident web_archive_customer_configuration web_customer_export_template web_customer_image_upload web_customer_mail_templates web_dashboards web_download_file web_export_templates web_export_templates_customer web_export_templates_reports web_export_templates_text web_export_templates_text_value web_export_templates_texts web_export_templates_widgets web_filter_attribute_type_ids web_filter_authors web_filter_black_lists web_filter_categories web_filter_countries web_filter_crossed_topics web_filter_data_providers web_filter_doc_types web_filter_genders web_filter_languages web_filter_market_price_classes web_filter_named_entities web_filter_nodes web_filter_post_comment_state web_filter_product web_filter_product_category_ids web_filter_product_sub_category_ids web_filter_ratings web_filter_sentiments web_filter_sort_field web_filter_sort_fields web_filter_source_types web_filter_sources web_filter_tags web_filter_topics web_filter_white_lists web_filters web_flags web_flagseries web_health_taskinfo web_kpi_customer_configuration web_label_nodes web_label_perspectives web_labels web_perspectives web_projects web_reply_templates web_reports web_reports_addresses web_reports_formats web_reports_widgets_filters web_shared_perspectives web_social_media_channel_token web_social_media_user_token web_themes web_user_annotation_context web_user_annotation_entry web_user_project web_webdashboard_containers web_webdashboard_links web_webdashboard_webdashboard_links web_webdashboards web_webpage_entry web_widget_color_settings web_widget_settings web_widget_settings_post_columns web_widget_settings_visible_columns web_widget_template_categories web_widget_template_categories_widgets web_widget_views web_widgets webpage_tracking_alerting webpage_tracking_category webpage_tracking_localization webpage_tracking_mailing webpage_tracking_permission webpage_tracking_request webpage_tracking_topic webpage_tracking_webpage webpage_tracking_webpage_content webpage_tracking_webpage_version > station-dev1_va.sql + + + station-dev-001.vicosrv.de /srv/sql/station-dev1_va.sql ``` \ No newline at end of file