SchemaDiff(WbConnection source, WbConnection target, String xmlNameSpace) Create a new SchemaDiff for the given connections with the given
namespace to be used when writing the XML.
compareAll() Setup this SchemaDiff object to compare all tables that the user
can access in the reference connection with all matching (=same name)
tables in the target connection.
getMigrateTargetXml() Return the XML that describes how the target schema needs to be
modified in order to get the same structure as the reference schema.
For this, each defined table in the reference schema will be compared
to the corresponding table in the target schema.
setSchemas(String rSchema, String tSchema) Setup this SchemaDiff object to compare all tables that the user
can access in the reference connection with all matching (=same name)
tables in the target connection.
setTables(List<TableIdentifier> reference) Define the reference tables to be compared with the matching
tables (based on the name) in the target connection.
public void
writeXml(Writer out) Write the XML of the schema differences to the supplied writer.
This writes some meta information about the compare, and then
creates a
TableDiff object for each pair of tables that
needs to be compared.
Create a new SchemaDiff for the given connections with the given
namespace to be used when writing the XML.
Parameters: source - The connection to the reference schema Parameters: target - the connection to the target schema Parameters: xmlNameSpace - the namespace to be used for the XML, may be null.
Setup this SchemaDiff object to compare all tables that the user
can access in the reference connection with all matching (=same name)
tables in the target connection.
This will retrieve all user tables from the reference (=source)
connection and will match them to the tables in the target connection.
When using compareAll() drop statements will be created for tables
present in the target connection but not existing in the reference
connection.
See Also:SchemaDiff.setTables(List,List) See Also:SchemaDiff.setTables(List)
Return the XML that describes how the target schema needs to be
modified in order to get the same structure as the reference schema.
For this, each defined table in the reference schema will be compared
to the corresponding table in the target schema.
See Also:TableDiff.getMigrateTargetXml
Define a list of table names that should not be compared.
Tables in the reference/source database that match one of the
names in this list will be skipped.
setIncludeForeignKeys
public void setIncludeForeignKeys(boolean flag)(Code)
Control whether foreign keys should be compared as well.
The default is to compare foreign keys.
Setup this SchemaDiff object to compare all tables that the user
can access in the reference connection with all matching (=same name)
tables in the target connection.
This will retrieve all user tables from the reference (=source)
connection and will match them to the tables in the target connection.
When using compareAll() drop statements will be created for tables
present in the target connection but not existing in the reference
connection.
See Also:SchemaDiff.setTables(List,List) See Also:SchemaDiff.setTables(List)
Define table names to be compared. The table names in the passed
lists will be converted to TableIdentifiers and then passed
on to setTables(List, List)
No name matching will take place. Thus it's possible to compare
tables that might have different names but are supposed to be identical
otherwise.
See Also:SchemaDiff.setTables(List,List) See Also:SchemaDiff.compareAll()
Define the tables to be compared. They will be compared based
on the position in the arrays (i.e. reference at index 0 will be
compared to target at index 0...)
No name matching will take place. Thus it's possible to compare
tables that might have different names but are supposed to be identical
otherwise.
See Also:SchemaDiff.setTables(List) See Also:SchemaDiff.compareAll()
Write the XML of the schema differences to the supplied writer.
This writes some meta information about the compare, and then
creates a
TableDiff object for each pair of tables that
needs to be compared. The output of
TableDiff.getMigrateTargetXml will then be written into the writer.