User Tools

Site Tools


db:compareschemas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
db:compareschemas [2015/09/07 16:44]
admin [Reverse Engineer the source db]
db:compareschemas [2015/09/07 16:45] (current)
admin
Line 9: Line 9:
 We have two (or more databases) with a primary one considered “source” and the rest considered “targets”. Our goal is to make sure that we synchronise the structure of the “source” with the rest of the databases. We have two (or more databases) with a primary one considered “source” and the rest considered “targets”. Our goal is to make sure that we synchronise the structure of the “source” with the rest of the databases.
  
-{{:​db:​initial_situation.png?​600|Initial situation}}+{{:​db:​initial_situation.png?​200|Initial situation}}
  
 ===== Reverse Engineer the source db ===== ===== Reverse Engineer the source db =====
Line 28: Line 28:
 Again, a couple of choices to be made. You can proceed by the default ones until you hit Select Schemata (4th screen). Here you should have the Model Schema already selected as “prima”. In order to work, select from the dropdown the target db (“secunda”) and click “Override Target”. Your result should look like in the next screenshot: Again, a couple of choices to be made. You can proceed by the default ones until you hit Select Schemata (4th screen). Here you should have the Model Schema already selected as “prima”. In order to work, select from the dropdown the target db (“secunda”) and click “Override Target”. Your result should look like in the next screenshot:
  
-{{:​db:​picture3.jpg?600|Selecting schemes}}+{{:​db:​picture3.jpg|Selecting schemes}}
  
  
Line 35: Line 35:
 Going for the next steps, you’re gonna reach “Select Changes to Apply”. Here you can easily check for the differences. Going for the next steps, you’re gonna reach “Select Changes to Apply”. Here you can easily check for the differences.
  
-{{:​db:​picture4.jpg?600|The Result}}+{{:​db:​picture4.jpg|The Result}}
  
 Going for the next step you can see actually the sql produced and that needs to be applied for your schemas. You can do that either manually (after reviewing it) or just automatically using MysqlWorkbench. Going for the next step you can see actually the sql produced and that needs to be applied for your schemas. You can do that either manually (after reviewing it) or just automatically using MysqlWorkbench.
  
-{{:​db:​picture5.jpg?600|Resulted SQL}}+{{:​db:​picture5.jpg|Resulted SQL}}
  
  
db/compareschemas.txt · Last modified: 2015/09/07 16:45 by admin