forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Schema Synchronization With Unnecessary Change Statements
Tagged: Compare, schema, Synchronization
- This topic is empty.
-
AuthorPosts
-
-
August 16, 2012 at 6:16 pm #12775mfordMember
When doing a Schema Synchronization, we often get unnecessary CHANGE statements for fields that are not actually being changed at all. The main culprit is when columns gets reordered.
If I have a table with the following structure:
CREATE TABLE `ic_info_datatype` (
`id_datatype` int(11) NOT NULL,
`filetype` varchar(16) default NULL ,
`protocolID` varchar(16) default NULL ,
`hardsw_type` varchar(32) NOT NULL default '0' ,
`hardsw_filename` varchar(256) default NULL ,
`hardsw_name` varchar(64) default NULL ,
`hardsw_desc` varchar(64) default NULL ,
`active` tinyint(4) default '1',
PRIMARY KEY (`id_datatype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
..and I make no change except to move the 'active' column after 'filetype' and before 'protocolID', a Schema Synchronization provides the following changes…
/* Alter table in target */
ALTER TABLE `ic_info_datatype`
CHANGE `active` `active` tinyint(4) NULL DEFAULT '1' after `filetype`,
CHANGE `protocolID` `protocolID` varchar(16) NULL after `active`,
CHANGE `hardsw_type` `hardsw_type` varchar(32) NOT NULL DEFAULT '0' after `protocolID`,
CHANGE `hardsw_filename` `hardsw_filename` varchar(256) NULL after `hardsw_type`,
CHANGE `hardsw_name` `hardsw_name` varchar(64) NULL after `hardsw_filename`,
CHANGE `hardsw_desc` `hardsw_desc` varchar(64) NULL after `hardsw_name`;
The last 5 CHANGE statements don't actually change anything and are not required. But our Development Team freeks out because they wonder if the sizes or defaults changed. Across a 100 table DB, the report is long and confusing. Can SQLyog find a way to not show those changes?
-
-
AuthorPosts
- You must be logged in to reply to this topic.