diff --git a/build/database/lite/install/kpi_c_report_nrf.sql b/build/database/lite/install/kpi_c_report_nrf.sql new file mode 100644 index 00000000..2affcefa --- /dev/null +++ b/build/database/lite/install/kpi_c_report_nrf.sql @@ -0,0 +1,31 @@ +-- ---------------------------- +-- Table structure for kpi_c_report_nrf +-- ---------------------------- +DROP TABLE IF EXISTS "kpi_c_report_nrf"; +CREATE TABLE "kpi_c_report_nrf" ( + "id" integer NOT NULL, + "ne_type" text(16), + "ne_name" text(64), + "rm_uid" text(64), + "date" text(10) NOT NULL, + "start_time" text(10), + "end_time" text(10), + "index" integer(11) NOT NULL, + "granularity" integer(11), + "kpi_values" text, + "created_at" integer(20), + PRIMARY KEY ("id") +); + +-- ---------------------------- +-- Indexes structure for table kpi_c_report_nrf +-- ---------------------------- +CREATE INDEX "idx_c_nrf_uid_at" +ON "kpi_c_report_nrf" ( + "rm_uid" ASC, + "created_at" ASC +); + +-- ---------------------------- +-- Records of kpi_c_report_nrf +-- ---------------------------- \ No newline at end of file diff --git a/build/database/lite/install/kpi_report_nrf.sql b/build/database/lite/install/kpi_report_nrf.sql new file mode 100644 index 00000000..556098bb --- /dev/null +++ b/build/database/lite/install/kpi_report_nrf.sql @@ -0,0 +1,31 @@ +-- ---------------------------- +-- Table structure for kpi_report_nrf +-- ---------------------------- +DROP TABLE IF EXISTS "kpi_report_nrf"; +CREATE TABLE "kpi_report_nrf" ( + "id" integer NOT NULL, + "ne_type" text(16), + "ne_name" text(64), + "rm_uid" text(64), + "date" text(10) NOT NULL, + "start_time" text(10), + "end_time" text(10), + "index" integer(11) NOT NULL, + "granularity" integer(11), + "kpi_values" text, + "created_at" integer(20), + PRIMARY KEY ("id") +); + +-- ---------------------------- +-- Indexes structure for table kpi_report_nrf +-- ---------------------------- +CREATE INDEX "idx_nrf_uid_at" +ON "kpi_report_nrf" ( + "rm_uid" ASC, + "created_at" ASC +); + +-- ---------------------------- +-- Records of kpi_report_nrf +-- ---------------------------- \ No newline at end of file diff --git a/build/database/lite/upgrade/upg_kpi_c_report_nrf.sql b/build/database/lite/upgrade/upg_kpi_c_report_nrf.sql new file mode 100644 index 00000000..efff6a74 --- /dev/null +++ b/build/database/lite/upgrade/upg_kpi_c_report_nrf.sql @@ -0,0 +1,30 @@ +-- ---------------------------- +-- Table structure for kpi_c_report_nrf +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "kpi_c_report_nrf" ( + "id" integer NOT NULL, + "ne_type" text(16), + "ne_name" text(64), + "rm_uid" text(64), + "date" text(10) NOT NULL, + "start_time" text(10), + "end_time" text(10), + "index" integer(11) NOT NULL, + "granularity" integer(11), + "kpi_values" text, + "created_at" integer(20), + PRIMARY KEY ("id") +); + +-- ---------------------------- +-- Indexes structure for table kpi_c_report_nrf +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "idx_c_nrf_uid_at" +ON "kpi_c_report_nrf" ( + "rm_uid" ASC, + "created_at" ASC +); + +-- ---------------------------- +-- Records of kpi_c_report_nrf +-- ---------------------------- \ No newline at end of file diff --git a/build/database/lite/upgrade/upg_kpi_report_nrf.sql b/build/database/lite/upgrade/upg_kpi_report_nrf.sql new file mode 100644 index 00000000..4b828fb1 --- /dev/null +++ b/build/database/lite/upgrade/upg_kpi_report_nrf.sql @@ -0,0 +1,30 @@ +-- ---------------------------- +-- Table structure for kpi_report_nrf +-- ---------------------------- +CREATE TABLE IF NOT EXISTS "kpi_report_nrf" ( + "id" integer NOT NULL, + "ne_type" text(16), + "ne_name" text(64), + "rm_uid" text(64), + "date" text(10) NOT NULL, + "start_time" text(10), + "end_time" text(10), + "index" integer(11) NOT NULL, + "granularity" integer(11), + "kpi_values" text, + "created_at" integer(20), + PRIMARY KEY ("id") +); + +-- ---------------------------- +-- Indexes structure for table kpi_report_nrf +-- ---------------------------- +CREATE INDEX IF NOT EXISTS "idx_nrf_uid_at" +ON "kpi_report_nrf" ( + "rm_uid" ASC, + "created_at" ASC +); + +-- ---------------------------- +-- Records of kpi_report_nrf +-- ---------------------------- \ No newline at end of file diff --git a/build/database/std/install/kpi_c_report_nrf.sql b/build/database/std/install/kpi_c_report_nrf.sql new file mode 100644 index 00000000..12432748 --- /dev/null +++ b/build/database/std/install/kpi_c_report_nrf.sql @@ -0,0 +1,24 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for kpi_c_report_nrf +-- ---------------------------- +DROP TABLE IF EXISTS `kpi_c_report_nrf`; +CREATE TABLE `kpi_c_report_nrf` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `rm_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `date` varchar(10) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Date of the report yyyy-mm-dd hh:mi:ss', + `start_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Start time of the report hh:mi:ss', + `end_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'End time of the report hh:mi:ss', + `index` int NOT NULL COMMENT 'Index of the report', + `granularity` int DEFAULT '60' COMMENT 'Time granualarity: 5/10/.../60/300 (second)', + `kpi_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'KPI values JSON String', + `created_at` bigint DEFAULT '0' COMMENT 'Creation time 接收到的timestamp秒级存储毫秒时间戳', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_c_nrf_uid_at` (`rm_uid`,`created_at`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='KPI_自定义指标数据_NRF'; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/build/database/std/install/kpi_report_nrf.sql b/build/database/std/install/kpi_report_nrf.sql new file mode 100644 index 00000000..69e07de5 --- /dev/null +++ b/build/database/std/install/kpi_report_nrf.sql @@ -0,0 +1,24 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for kpi_report_nrf +-- ---------------------------- +DROP TABLE IF EXISTS `kpi_report_nrf`; +CREATE TABLE `kpi_report_nrf` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `rm_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `date` varchar(10) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Date of the report yyyy-mm-dd hh:mi:ss', + `start_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Start time of the report hh:mi:ss', + `end_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'End time of the report hh:mi:ss', + `index` int NOT NULL COMMENT 'Index of the report', + `granularity` int DEFAULT '60' COMMENT 'Time granualarity: 5/10/.../60/300 (second)', + `kpi_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'KPI values JSON String', + `created_at` bigint DEFAULT '0' COMMENT 'Creation time 接收到的timestamp秒级存储毫秒时间戳', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_nrf_uid_at` (`rm_uid`,`created_at`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='KPI_指标数据_NRF'; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/build/database/std/upgrade/upg_kpi_c_report_nrf.sql b/build/database/std/upgrade/upg_kpi_c_report_nrf.sql new file mode 100644 index 00000000..fe949e98 --- /dev/null +++ b/build/database/std/upgrade/upg_kpi_c_report_nrf.sql @@ -0,0 +1,27 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for kpi_c_report_nrf +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `kpi_c_report_nrf` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `rm_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `date` varchar(10) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Date of the report yyyy-mm-dd hh:mi:ss', + `start_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Start time of the report hh:mi:ss', + `end_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'End time of the report hh:mi:ss', + `index` int NOT NULL COMMENT 'Index of the report', + `granularity` int DEFAULT '60' COMMENT 'Time granualarity: 5/10/.../60/300 (second)', + `kpi_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'KPI values JSON String', + `created_at` bigint DEFAULT '0' COMMENT 'Creation time 接收到的timestamp秒级存储毫秒时间戳', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_c_nrf_uid_at` (`rm_uid`,`created_at`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='KPI_自定义指标数据_NRF'; + +-- ---------------------------- +-- COLUMN for kpi_c_report_nrf +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/build/database/std/upgrade/upg_kpi_report_nrf.sql b/build/database/std/upgrade/upg_kpi_report_nrf.sql new file mode 100644 index 00000000..caf0d026 --- /dev/null +++ b/build/database/std/upgrade/upg_kpi_report_nrf.sql @@ -0,0 +1,27 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for kpi_report_nrf +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `kpi_report_nrf` ( + `id` int NOT NULL AUTO_INCREMENT, + `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `rm_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', + `date` varchar(10) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'Date of the report yyyy-mm-dd hh:mi:ss', + `start_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Start time of the report hh:mi:ss', + `end_time` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'End time of the report hh:mi:ss', + `index` int NOT NULL COMMENT 'Index of the report', + `granularity` int DEFAULT '60' COMMENT 'Time granualarity: 5/10/.../60/300 (second)', + `kpi_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'KPI values JSON String', + `created_at` bigint DEFAULT '0' COMMENT 'Creation time 接收到的timestamp秒级存储毫秒时间戳', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_nrf_uid_at` (`rm_uid`,`created_at`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='KPI_指标数据_NRF'; + +-- ---------------------------- +-- COLUMN for kpi_report_nrf +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1;