From 01af211775c8b091abbc10248663b28c9ca85f9d Mon Sep 17 00:00:00 2001 From: Tim Kuhlman Date: Mon, 17 Mar 2014 13:56:27 -0600 Subject: [PATCH] Returned to varchar for ids --- files/default/mon.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/files/default/mon.sql b/files/default/mon.sql index 4ca0fe0..4408d7b 100644 --- a/files/default/mon.sql +++ b/files/default/mon.sql @@ -5,7 +5,7 @@ SET foreign_key_checks = 0; DROP TABLE IF EXISTS `alarm`; CREATE TABLE `alarm` ( - `id` INT NOT NULL, + `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `expression` mediumtext COLLATE utf8mb4_unicode_ci, @@ -20,8 +20,8 @@ CREATE TABLE `alarm` ( DROP TABLE IF EXISTS `alarm_action`; CREATE TABLE `alarm_action` ( - `alarm_id` INT NOT NULL, - `notification_method_id` INT NOT NULL, + `alarm_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, + `notification_method_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`alarm_id`,`notification_method_id`), CONSTRAINT `fk_alarm_action_alarm_id` FOREIGN KEY (`alarm_id`) REFERENCES `alarm` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_alarm_action_notification_method_id` FOREIGN KEY (`notification_method_id`) REFERENCES `notification_method` (`id`) ON DELETE CASCADE @@ -29,7 +29,7 @@ CREATE TABLE `alarm_action` ( DROP TABLE IF EXISTS `notification_method`; CREATE TABLE `notification_method` ( - `id` INT NOT NULL, + `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `tenant_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type` enum('EMAIL','SMS') COLLATE utf8mb4_unicode_ci NOT NULL, @@ -41,8 +41,8 @@ CREATE TABLE `notification_method` ( DROP TABLE IF EXISTS `sub_alarm`; CREATE TABLE `sub_alarm` ( - `id` INT NOT NULL, - `alarm_id` INT NOT NULL, + `id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, + `alarm_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `function` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, `metric_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `operator` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL, @@ -59,7 +59,7 @@ CREATE TABLE `sub_alarm` ( DROP TABLE IF EXISTS `sub_alarm_dimension`; CREATE TABLE `sub_alarm_dimension` ( - `sub_alarm_id` INT NOT NULL, + `sub_alarm_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL, `dimension_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `value` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`sub_alarm_id`,`dimension_name`),