From 5c898996cb21bdefaedaae17850ee645513ed691 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Fri, 22 Aug 2025 11:46:26 +0200 Subject: [PATCH] MT#63454 Add new time_set_invert column to billing.ncos_levels The new column store a value 0 or 1 to define wether the ncos is applied when the time_set matches or not. Change-Id: I65a8085afc61f0607fc90521015a4ceef11adc7b --- db_scripts/diff/15869.down | 7 +++++++ db_scripts/diff/15869.up | 7 +++++++ schema/billing.json | 12 ++++++++++++ schema/billing.sql | 1 + schema/ngcp.sql | 3 ++- 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 db_scripts/diff/15869.down create mode 100644 db_scripts/diff/15869.up diff --git a/db_scripts/diff/15869.down b/db_scripts/diff/15869.down new file mode 100644 index 00000000..f65a8a75 --- /dev/null +++ b/db_scripts/diff/15869.down @@ -0,0 +1,7 @@ +use billing; +set autocommit=0; + +ALTER TABLE ncos_levels + DROP `time_set_invert`; + +commit; diff --git a/db_scripts/diff/15869.up b/db_scripts/diff/15869.up new file mode 100644 index 00000000..0f0423fa --- /dev/null +++ b/db_scripts/diff/15869.up @@ -0,0 +1,7 @@ +use billing; +set autocommit=0; + +ALTER TABLE ncos_levels + ADD `time_set_invert` tinyint(1) NOT NULL DEFAULT 0; + +commit; diff --git a/schema/billing.json b/schema/billing.json index ad5e6551..bdca0085 100644 --- a/schema/billing.json +++ b/schema/billing.json @@ -4356,6 +4356,18 @@ "TABLE_NAME" : "ncos_levels", "key_col" : "ncos_levels/time_set_id" }, + "ncos_levels/time_set_invert" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : "0", + "COLUMN_NAME" : "time_set_invert", + "COLUMN_TYPE" : "tinyint(1)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 10, + "TABLE_NAME" : "ncos_levels", + "key_col" : "ncos_levels/time_set_invert" + }, "ncos_lnp_list/description" : { "CHARACTER_SET_NAME" : "utf8mb3", "COLLATION_NAME" : "utf8mb3_general_ci", diff --git a/schema/billing.sql b/schema/billing.sql index fd83e849..59f91b49 100644 --- a/schema/billing.sql +++ b/schema/billing.sql @@ -738,6 +738,7 @@ CREATE TABLE `ncos_levels` ( `description` text DEFAULT NULL, `time_set_id` int(11) unsigned DEFAULT NULL, `expose_to_customer` tinyint(1) NOT NULL DEFAULT 0, + `time_set_invert` 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`), diff --git a/schema/ngcp.sql b/schema/ngcp.sql index b88a2a9d..af94836d 100644 --- a/schema/ngcp.sql +++ b/schema/ngcp.sql @@ -25,7 +25,7 @@ CREATE TABLE `db_schema` ( PRIMARY KEY (`id`), UNIQUE KEY `rev_idx` (`revision`,`node`,`site_id`), KEY `release_idx` (`release`) -) ENGINE=InnoDB AUTO_INCREMENT=914 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=915 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 = utf8mb4 */; @@ -30965,6 +30965,7 @@ INSERT INTO `db_schema` VALUES (910,15865,'spce','1970-01-01 00:00:01','trunk',N INSERT INTO `db_schema` VALUES (911,15866,'spce','1970-01-01 00:00:01','trunk',NULL); INSERT INTO `db_schema` VALUES (912,15867,'spce','1970-01-01 00:00:01','trunk',1); INSERT INTO `db_schema` VALUES (913,15868,'spce','1970-01-01 00:00:01','trunk',1); +INSERT INTO `db_schema` VALUES (914,15869,'spce','1970-01-01 00:00:01','trunk',1); commit; set autocommit=0; INSERT INTO `timezone` VALUES ('1','localtime','1970-01-01 00:00:01','1970-01-01 00:00:01',NULL);