Consider this structure. Let’s assume source and target DB has the same structure.
CREATE TABLE IF NOT EXISTS `storage_drive` (
`drive_id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`drive_key` varchar(510) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`drive_path_template` varchar(510) COLLATE utf8mb4_unicode_520_ci NOT NULL,
`drive_path_prefix` varchar(510) COLLATE utf8mb4_unicode_520_ci GENERATED ALWAYS AS (replace(`drive_path_template`,'{$driveKey}',`drive_key`)) STORED,
PRIMARY KEY (`drive_id`),
KEY `drive_path_prefix` (`drive_path_prefix`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
Source DB has this record (run this query on source DB)
INSERT INTO `storage_drive` (`drive_id`, `drive_key`, `drive_path_template`) VALUES (NULL, 'cool key', 'tempate and {$driveKey}')
Now compare on Toad Data Point, and you will get this query for Target DB migration script:
/*
Script created by Quest Software Inc. Data Compare at 2018/10/22 13:05:27
This script must be executed against toad-test-target on localhost
This script applies changes to toad-test-target to make it the same as toad-test on localhost
*/
USE `toad-test-target`;
START TRANSACTION;
INSERT INTO `toad-test-target`.`storage_drive` (`drive_id`, `drive_key`, `drive_path_template`, `drive_path_prefix`)
VALUES (4, 'cool key', 'tempate and {$driveKey}', 'tempate and cool key');
COMMIT;
Instead, I expect this:
/*
Script created by Quest Software Inc. Data Compare at 2018/10/22 13:05:27
This script must be executed against toad-test-target on localhost
This script applies changes to toad-test-target to make it the same as toad-test on localhost
*/
USE `toad-test-target`;
START TRANSACTION;
INSERT INTO `toad-test-target`.`storage_drive` (`drive_id`, `drive_key`, `drive_path_template`)
VALUES (4, 'cool key', 'tempate and {$driveKey}');
COMMIT;
(Should not have “drive_path_prefix
” in there, because it is a generated column)