From 5a674e4f22d2478d062e83f8b618c26b3d57fc41 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Wed, 14 Sep 2022 16:04:49 +0300 Subject: [PATCH] MT#55295 Use '/' instead of '_' as a delimiter In the output it was look like: columns/provisioning/voip_subscribers_pbx_hunt_policy/column_type So it's hard to understand where is table name (voip_subscribers) and where is column name (pbx_hunt_policy). Use '/' so it will look readable. Change-Id: I2e7ba54ab6a12b3cfc763964ac79feb7a057d63a --- helper/compare_dbs.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helper/compare_dbs.pl b/helper/compare_dbs.pl index f125475..044da2b 100755 --- a/helper/compare_dbs.pl +++ b/helper/compare_dbs.pl @@ -63,7 +63,7 @@ SELECT c.CHARACTER_SET_NAME, c.COLLATION_NAME, c.ORDINAL_POSITION, - CONCAT(c.TABLE_NAME, '_', c.COLUMN_NAME) AS key_col + CONCAT(c.TABLE_NAME, '/', c.COLUMN_NAME) AS key_col FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON c.TABLE_NAME = t.TABLE_NAME @@ -85,7 +85,7 @@ SELECT SUB_PART, NULLABLE, INDEX_TYPE, - CONCAT(TABLE_NAME, '_', INDEX_NAME, '_', SEQ_IN_INDEX) AS key_col + CONCAT(TABLE_NAME, '/', INDEX_NAME, '/', SEQ_IN_INDEX) AS key_col FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME, INDEX_NAME, COLUMN_NAME @@ -101,7 +101,8 @@ SELECT rc.DELETE_RULE, cu.REFERENCED_COLUMN_NAME, cu.COLUMN_NAME, - CONCAT(rc.CONSTRAINT_NAME, '_', rc.TABLE_NAME, '_', cu.COLUMN_NAME, '_', rc.REFERENCED_TABLE_NAME, '_', + CONCAT(rc.CONSTRAINT_NAME, '/', rc.TABLE_NAME, '/', + cu.COLUMN_NAME, '/', rc.REFERENCED_TABLE_NAME, '/', cu.REFERENCED_COLUMN_NAME) AS key_col FROM information_schema.REFERENTIAL_CONSTRAINTS rc LEFT JOIN information_schema.KEY_COLUMN_USAGE cu @@ -120,7 +121,7 @@ SELECT ACTION_TIMING, EVENT_OBJECT_SCHEMA, EVENT_OBJECT_TABLE, - CONCAT(TRIGGER_NAME, '_', EVENT_OBJECT_TABLE) AS key_col + CONCAT(TRIGGER_NAME, '/', EVENT_OBJECT_TABLE) AS key_col FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA = DATABASE() ORDER BY EVENT_OBJECT_TABLE, TRIGGER_NAME