Schema View Panel
Once the two databases are compared, the Schema View panel (see the picture)
shows the versions of the schema imported from each of the them. The schema
tree shows them both together, compared against each other and
merged, with any
differences color-marked.
Note the "Summary collections" top-level node in the
schema tree. That is where AdeptSQL Diff collects indexes, triggers and
foreign key constraints defined for all tables in the database. In other
words, you can see each index (or a trigger, or a foreign key) in two places:
as a sub-node of its parent table and in a separate collection of all such
entities in the schema. Which means you can easily generate SQL for all
or for any subset of these collections.
|
Schema Commands
The operations described below are available as buttons on the schema
panel's toolbar and/or as commands in the context menu:
|
Button |
Menu / Keyboard |
Description |
   |
Ctrl-Alt-(Home | Down | Up) |
Navigates from one schema difference to another: first difference, next
difference, previous difference. |
|
 |
"Refresh schema", F5 |
Re-reads the whole schema from both the database and the project scripts. |
 |
"Visual comparison...",
Ctrl-Alt-Enter |
Show side-by-side text comparison for the object's definition. This is only
enabled when the selected schema item is different in the scripts and in the
database |
 |
"Update <first database>"(Ctrl-Alt-LEFT) |
Select one or several schema items or even the whole schema. When you click this
button, the program generates a difference script which should be applied to the
first database to synchronize the selected items in it with those the second
one. The script shows in
the SQL Code View window, ready to be sent to
the server. |
 |
"Update <second database>" (Ctrl-Alt-RIGHT) |
Same as above, but the code is generated to be applied to the second database,
to synchronize it with the first one. |
 |
"Filters" submenu |
Clicking this button pulls down the
schema filter
menu, where you can specify a subset of schema to be visible in the tree.
From the menu you can hide identical items and do other things - see the link
above for details. |
 |
"Produce SQL for <Database1>/
Copy CREATE statements" |
Shows SQL for the selected schema entity in the CodeView window. There is
also a similar command for the other database. See also
the description of drag & drop technique below |
| |
"Produce SQL for <Database2>/
Copy DROP statements" |
As above, but generates the SQL for dropping
the selected schema entity. |
Using drag-n-drop
When you need to generate SQL from the schema, the most convenient way is to
drag one or several selected items to the AdeptSQL Diff's SQL editor or any
other editor supporting OLE drag-and-drop. The SQL code you get will depend on
the keyboard shift keys and the item being dragged. You can find further details
in the topic on drag and drop.
|