Help - Search - Members - Calendar
Full Version: New Feature: Re-create Table
Webyog Forums > SQLyog > SQLyog: Bugs / Feature Requests
uyuni
If we have a one-way sync this would be very useful:

- when the structure of the source table was changed:
- during sync target table is automatically dropped and recreated
- then sync normally

Now I have to do this manually ...

Best would be an option if I'd like a recreate or not on one-way-sync.


Emile
peterlaursen
hmmm .. I think it could be a little bit dangerous that way!
DATA SYNC needs totally identical tables. This protects against a completely 'mad' and mistaken sync operation.

What you request is actually that STRUCTURE SYNC is implemented in the SJA as well. And that is no bad idea - but there are some security concerns ....
uyuni
It makes sense here:

- I have a shop-website with a MySQL-database
- the customer syncs the web-database to his computer (oneway sync)
- because that computer is behind a firewall I (as a developer) cannot access it
- I have to change the structure of the web-database because of new features
- The one-way sync doesn't work anymore and I have to drive to the customer to change it ...

Emile
peterlaursen
The customer could/should run a STRUCTURE SYNC before DATA SYNC.
However still the STRUCTURE SYNC could be implemented in the SJA.

But the risk is that he syncs to the wrong database and completely destroys it!

There are workarounds, for instance:
* you upload the latest 'create statement for the table' to somewhere
* he downloads it and creates an empty database
* he STRUCTURE syncs changes from this empty database to his production database
* now he can do the DATA SYNC
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.