From 2e7d385f70418123ea4638f5a7d6cce3d88e56c6 Mon Sep 17 00:00:00 2001 From: Sipwise Jenkins Builder Date: Mon, 26 Jun 2023 12:24:44 +0200 Subject: [PATCH] MT#57580 add ncos_levels,ncos_sets expose_to_customer, schemes update Change-Id: Ideb48d628264c81413b81e12461e0d6065adc3b0 --- schema/billing.json | 48 +++++++++++++++++++++++++++++++++++++++++ schema/billing.sql | 4 ++++ schema/kamailio.sql | 2 +- schema/ngcp.sql | 3 ++- schema/provisioning.sql | 2 +- 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/schema/billing.json b/schema/billing.json index 9a92c94d..eb3027bb 100644 --- a/schema/billing.json +++ b/schema/billing.json @@ -4104,6 +4104,18 @@ "TABLE_NAME" : "ncos_levels", "key_col" : "ncos_levels/description" }, + "ncos_levels/expose_to_customer" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : "0", + "COLUMN_NAME" : "expose_to_customer", + "COLUMN_TYPE" : "tinyint(1)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 9, + "TABLE_NAME" : "ncos_levels", + "key_col" : "ncos_levels/expose_to_customer" + }, "ncos_levels/id" : { "CHARACTER_SET_NAME" : null, "COLLATION_NAME" : null, @@ -4380,6 +4392,18 @@ "TABLE_NAME" : "ncos_sets", "key_col" : "ncos_sets/description" }, + "ncos_sets/expose_to_customer" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : "0", + "COLUMN_NAME" : "expose_to_customer", + "COLUMN_TYPE" : "tinyint(1)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 5, + "TABLE_NAME" : "ncos_sets", + "key_col" : "ncos_sets/expose_to_customer" + }, "ncos_sets/id" : { "CHARACTER_SET_NAME" : null, "COLLATION_NAME" : null, @@ -9612,6 +9636,18 @@ "TABLE_NAME" : "ncos_levels", "key_col" : "ncos_levels/PRIMARY/1" }, + "ncos_levels/expose_to_customer_idx/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "expose_to_customer", + "INDEX_NAME" : "expose_to_customer_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "ncos_levels", + "key_col" : "ncos_levels/expose_to_customer_idx/1" + }, "ncos_levels/nl_time_set_id_idx/1" : { "COLLATION" : "A", "COLUMN_NAME" : "time_set_id", @@ -9828,6 +9864,18 @@ "TABLE_NAME" : "ncos_sets", "key_col" : "ncos_sets/PRIMARY/1" }, + "ncos_sets/expose_to_customer_idx/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "expose_to_customer", + "INDEX_NAME" : "expose_to_customer_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "ncos_sets", + "key_col" : "ncos_sets/expose_to_customer_idx/1" + }, "ncos_sets/resname_idx/1" : { "COLLATION" : "A", "COLUMN_NAME" : "reseller_id", diff --git a/schema/billing.sql b/schema/billing.sql index ebbf15cd..abdb53be 100644 --- a/schema/billing.sql +++ b/schema/billing.sql @@ -713,9 +713,11 @@ CREATE TABLE `ncos_levels` ( `intra_pbx` tinyint(1) NOT NULL DEFAULT 0, `description` text DEFAULT NULL, `time_set_id` int(11) unsigned DEFAULT NULL, + `expose_to_customer` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `reslev_idx` (`reseller_id`,`level`), KEY `nl_time_set_id_idx` (`time_set_id`), + KEY `expose_to_customer_idx` (`expose_to_customer`), CONSTRAINT `c_l_resellerid_ref` FOREIGN KEY (`reseller_id`) REFERENCES `resellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `nl_time_set_id_ref` FOREIGN KEY (`time_set_id`) REFERENCES `provisioning`.`voip_time_sets` (`id`) ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; @@ -778,8 +780,10 @@ CREATE TABLE `ncos_sets` ( `reseller_id` int(11) unsigned DEFAULT NULL, `name` varchar(255) NOT NULL, `description` varchar(255) DEFAULT NULL, + `expose_to_customer` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `resname_idx` (`reseller_id`,`name`), + KEY `expose_to_customer_idx` (`expose_to_customer`), CONSTRAINT `n_c_resellerid_ref` FOREIGN KEY (`reseller_id`) REFERENCES `resellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/schema/kamailio.sql b/schema/kamailio.sql index 3242cbef..7c380389 100644 --- a/schema/kamailio.sql +++ b/schema/kamailio.sql @@ -1069,7 +1069,7 @@ INSERT INTO `dom_preferences` VALUES (27,'','0','voip.sipwise.local','play_annou INSERT INTO `dom_preferences` VALUES (28,'','0','voip.sipwise.local','mobile_push_enable',0,'never',NOW()); INSERT INTO `dom_preferences` VALUES (29,'','0','voip.sipwise.local','busy_hg_member_mode',0,'ring',NOW()); INSERT INTO `domain` VALUES (1,'voip.sipwise.local',NOW(),NULL); -INSERT INTO `subscriber` VALUES (1,'no_such_number','voip.sipwise.local','6b359b89c7a97447d0400459b1150a46','2c99fdedfba9f10c80e49c132c7ff432','204bd2896cfae521526ab7ff170291a7','9bcb88b6-541a-43da-8fdc-816f5557ff93','',NOW()); +INSERT INTO `subscriber` VALUES (1,'no_such_number','voip.sipwise.local','92c0445b7798e03b4e5b5954ee7d1b2f','1bac218b56a4b8de33923c52efbca61b','fbc6a1104f880c85f6717ee8c192bb3f','9bcb88b6-541a-43da-8fdc-816f5557ff93','',NOW()); INSERT INTO `usr_preferences` VALUES (1,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','cloud_pbx_hunt_policy',0,'none',NOW()); INSERT INTO `usr_preferences` VALUES (5,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','emergency_location_format',0,'cirpack',NOW()); INSERT INTO `usr_preferences` VALUES (6,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','play_announce_before_recording',0,'never',NOW()); diff --git a/schema/ngcp.sql b/schema/ngcp.sql index 5b352979..a023e38c 100644 --- a/schema/ngcp.sql +++ b/schema/ngcp.sql @@ -20,7 +20,7 @@ CREATE TABLE `db_schema` ( `applied_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `rev_idx` (`revision`,`node`) -) ENGINE=InnoDB AUTO_INCREMENT=841 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=842 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -30883,6 +30883,7 @@ INSERT INTO `db_schema` VALUES (837,15768,'spce',NOW()); INSERT INTO `db_schema` VALUES (838,15770,'spce',NOW()); INSERT INTO `db_schema` VALUES (839,15771,'spce',NOW()); INSERT INTO `db_schema` VALUES (840,15772,'spce',NOW()); +INSERT INTO `db_schema` VALUES (841,15773,'spce',NOW()); INSERT INTO `timezone` VALUES ('1','localtime',NOW(),NOW(),NULL); INSERT INTO `tzinfo_version` VALUES ('1','0',NOW(),NOW()); COMMIT; diff --git a/schema/provisioning.sql b/schema/provisioning.sql index fd0aba73..3c070940 100644 --- a/schema/provisioning.sql +++ b/schema/provisioning.sql @@ -4319,7 +4319,7 @@ INSERT INTO `voip_sound_handles` VALUES (149,'recent_call_deleted',12,1); INSERT INTO `voip_sound_handles` VALUES (150,'ringback_tone',13,1); INSERT INTO `voip_sound_handles` VALUES (151,'aa_timeout',2,1); INSERT INTO `voip_sound_handles` VALUES (152,'aa_default',2,1); -INSERT INTO `voip_subscribers` VALUES (3,'no_such_number',2,'9bcb88b6-541a-43da-8fdc-816f5557ff93','6b359b89c7a97447d0400459b1150a46',0,NULL,NULL,NULL,0,0,'none',NULL,NULL,NULL,NULL,NOW(),NOW()); +INSERT INTO `voip_subscribers` VALUES (3,'no_such_number',2,'9bcb88b6-541a-43da-8fdc-816f5557ff93','92c0445b7798e03b4e5b5954ee7d1b2f',0,NULL,NULL,NULL,0,0,'none',NULL,NULL,NULL,NULL,NOW(),NOW()); INSERT INTO `voip_usr_preferences` VALUES (1,3,97,'none',NOW()); INSERT INTO `voip_usr_preferences` VALUES (7,3,372,'cirpack',NOW()); INSERT INTO `voip_usr_preferences` VALUES (8,3,305,'never',NOW());