From 7a4eacb7dfd30bfa0a0c2be77c0cf3a657da5be1 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Thu, 19 Jun 2025 12:21:07 +0200 Subject: [PATCH] MT#60563 Add 'label' column to provisioning.autoprov_field_device_lines The new column allows to store the label to show on the deskphone's displays for the line types 'speeddial', 'forward' and 'transfer'. Change-Id: I1323a4ac941b9ed15aa0bbd4ed59f387b8349b12 --- db_scripts/diff/15868.down | 6 ++++++ db_scripts/diff/15868.up | 6 ++++++ schema/ngcp.sql | 5 +++-- schema/provisioning.json | 12 ++++++++++++ schema/provisioning.sql | 1 + 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 db_scripts/diff/15868.down create mode 100644 db_scripts/diff/15868.up diff --git a/db_scripts/diff/15868.down b/db_scripts/diff/15868.down new file mode 100644 index 00000000..699651ae --- /dev/null +++ b/db_scripts/diff/15868.down @@ -0,0 +1,6 @@ +use provisioning; +set autocommit=0; + +ALTER TABLE autoprov_field_device_lines DROP COLUMN `label`; + +COMMIT; \ No newline at end of file diff --git a/db_scripts/diff/15868.up b/db_scripts/diff/15868.up new file mode 100644 index 00000000..2192262e --- /dev/null +++ b/db_scripts/diff/15868.up @@ -0,0 +1,6 @@ +use provisioning; +set autocommit=0; + +ALTER TABLE autoprov_field_device_lines ADD COLUMN `label` varchar(100) DEFAULT NULL; + +COMMIT; \ No newline at end of file diff --git a/schema/ngcp.sql b/schema/ngcp.sql index ac38be3e..b88a2a9d 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=913 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=914 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 */; @@ -30963,7 +30963,8 @@ INSERT INTO `db_schema` VALUES (908,15863,'spce','1970-01-01 00:00:01','trunk',N INSERT INTO `db_schema` VALUES (909,15864,'spce','1970-01-01 00:00:01','trunk',NULL); INSERT INTO `db_schema` VALUES (910,15865,'spce','1970-01-01 00:00:01','trunk',NULL); 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',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); commit; set autocommit=0; INSERT INTO `timezone` VALUES ('1','localtime','1970-01-01 00:00:01','1970-01-01 00:00:01',NULL); diff --git a/schema/provisioning.json b/schema/provisioning.json index 2dc4bcaa..3a7b189b 100644 --- a/schema/provisioning.json +++ b/schema/provisioning.json @@ -540,6 +540,18 @@ "TABLE_NAME" : "autoprov_field_device_lines", "key_col" : "autoprov_field_device_lines/key_num" }, + "autoprov_field_device_lines/label" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : "NULL", + "COLUMN_NAME" : "label", + "COLUMN_TYPE" : "varchar(100)", + "EXTRA" : "", + "IS_NULLABLE" : "YES", + "ORDINAL_POSITION" : 10, + "TABLE_NAME" : "autoprov_field_device_lines", + "key_col" : "autoprov_field_device_lines/label" + }, "autoprov_field_device_lines/line_type" : { "CHARACTER_SET_NAME" : "utf8mb3", "COLLATION_NAME" : "utf8mb3_general_ci", diff --git a/schema/provisioning.sql b/schema/provisioning.sql index 82ebc728..ee7f5bb2 100644 --- a/schema/provisioning.sql +++ b/schema/provisioning.sql @@ -100,6 +100,7 @@ CREATE TABLE `autoprov_field_device_lines` ( `extension_unit` tinyint(3) unsigned NOT NULL DEFAULT 0, `deviceid_dbaliases_id` int(11) unsigned DEFAULT NULL, `target_number` varchar(100) DEFAULT NULL, + `label` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_fdev_line_const` (`device_id`), KEY `fk_sub_line_const` (`subscriber_id`),