How to compare the structure of two tables and update the other?

Asked

Viewed 621 times

1

The question is the same as the title:

How to compare the structure of two tables and update the other?

I have an online database, which I intend to update its structure. I also have some customers who use offline fingered banks on their machines.

I want that when my client has internet, he compares the structure of his bank with that of the online bank. If there is a difference, he updates.

  • The difference is only structural or data entered in the database?

  • structural difference

1 answer

1


You can do it through the Mysql Workbench:

First, you have to convert your schema into a model, do so:

  1. Database > Reverse Engineer
  2. Select Database > Next
  3. Next
  4. Select the schema you want to convert > Next
  5. Next
  6. Select Tables > Run >
  7. Next
  8. Finish

After converting the schema to model, do:

  1. Database > Synchronize with Any Source
  2. Next
  3. Send Updates To > Destination Database Server > Next
  4. Fill in the Target Database > Next
  5. Next
  6. Select the table you want to sync > Next
  7. Next
  8. All available changes will be listed > Next
  9. Execute >

A txt will be generated with the possible changes and clicking Execute > it will perform all the changes and leave the structures of the two banks identical.

If you have an error, you will be listed as well.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.