Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Schema Synchronization With Unnecessary Change Statements

forums forums SQLyog SQLyog: Bugs / Feature Requests Schema Synchronization With Unnecessary Change Statements

This topic contains 0 replies, has 0 voices, and was last updated by  peterlaursen 6 years, 7 months ago.

  • Author
    Posts
  • #12775

    mford
    Member

    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?

  • #33718

    peterlaursen
    Participant

    Please tell what SQLyog version you are using.

You must be logged in to reply to this topic.