January 25, 2016 at 3:37 am #13484
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’ ;
January 25, 2016 at 2:07 pm #35640
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.
January 25, 2016 at 4:23 pm #35641
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?
January 29, 2016 at 4:40 pm #35642
Does the lack of a reply mean it is not possible to merge the tables?
February 2, 2016 at 11:28 am #35643
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?
February 2, 2016 at 7:10 pm #35644
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.