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

Synchronization Ignoring Drop

forums forums SQLyog SQLyog: Bugs / Feature Requests Synchronization Ignoring Drop

This topic contains 4 replies, has 0 voices, and was last updated by  dbusr 2 years, 11 months ago.

  • Author
    Posts
  • #13484

    dbusr
    Member

    When I run the Synchronization tool with ignore drop, it adds the drops anyway. To see this, create a database with this table:

    CREATE TABLE `symbols` (
    `symbols_id` int(11) NOT NULL AUTO_INCREMENT,
    `products_nav_access` varchar(255) NOT NULL DEFAULT 'G,0',
    PRIMARY KEY (`symbols_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;

    and a second database with this table:

    CREATE TABLE symbols (
    symbols_id int NOT NULL auto_increment,
    PRIMARY KEY (symbols_id)
    ) CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    Then run the tool with the to be dropped box checked as shown in the attached image.

    When I do that, the output is

    ALTER TABLE `symbols`
    DROP COLUMN `products_nav_access` , ENGINE=InnoDB, DEFAULT CHARSET=’utf8′, COLLATE =’utf8_unicode_ci’ ;

  • #35640

    peterlaursen
    Participant

    The option “To be dropped|created|altered in target”  is applicable only to tables,views,stored procedures,function,trigger and events (“1st level” database objects) present in the target but not in the source. The options under “hide and ignore objects” are applicable only to these objects but not ‘subobjects’ – ie. table columns and indexes. If you choose to “hide and ignore” ‘objects to be altered’ you will see that no script is generated. 

     

    The purpose of the tool is  ‘synchronization’ of “1st level” objects as listed and it works as expected. 

  • #35641

    dbusr
    Member

    If I click the ignore altered it does skip those drops. But it also skips the alter – that of adding the missing field – so that is worse. The goal is to have the second table have the same fields as the first table. I can then run the Database Synchronization script to get the data copied over. Is there a way to accomplish this without having to manually edit the result of the Schema Synchronization script?

  • #35642

    dbusr
    Member

    Does the lack of a reply mean it is not possible to merge the tables?

  • #35643

    peterlaursen
    Participant

    I think that the reply already given – ie. The option “To be dropped|created|altered in target”  is applicable only to tables,views,stored procedures,function,trigger and events (“1st level” database objects) ..” explains. Am I missing something? 

  • #35644

    dbusr
    Member

    The given answer is for my original question. But then I asked if it was possible to create a copy of the table without fields being dropped, not necessarily using the mentioned tools, and that one wasn’t answered. I’m assuming the answer is no but since I run into this fairly often and it is the only reason I upgraded to the Ultimate version, I want to be sure.

You must be logged in to reply to this topic.