I would start by adding a database tier to accept API calls from the business tier, and then write for both the old schema and the new one. This adds complexity up, but helps ensure that data remains in sync.
This will require a legacy system change to invoke the API instead of issuing SQL statements. If they did not have the forethought to do this initially, you may not be able to accept my approach. But you have to do it in the future.
Triggers may or may not work. In older versions of MySQL, there can only be one trigger of this type in this table. This forces you to combine unrelated things into one trigger.
Replication can solve some changes - Engine, datatypes, etc. But this does not help with splitting one table into two. Be careful with trigger replication and trigger effect (between Master and Slave). In general, the stored procedure should be performed on the Wizard, allowing the effect to be replicated to the subordinate. But maybe you should think about how to start a trigger on a slave. Or different triggers on two servers.
Another thought is to make the transformation in stages. With careful planning of circuit changes and the use of triggers compared to code changes compared to the database level, you can perform partial conversions one at a time, sometimes without a big glitch, to update everything at the same time (fingers crossed). A simple example: (1) change the code to dynamically process a new or old scheme, (2) change the scheme, (3) clear the code (delete the processing of the old scheme).
source share