}
@Test
public void testFKOnDifferentColumn() {
// given a table from which a foreign key constraint was removed
DBTable target = createTableWithColumns("target", 2);
DBTable table1 = createTableWithColumns("tbl", 2);
new DBForeignKeyConstraint("fk1", false, table1, new String[] { "col1" }, target, new String[] { "col1" });
DBTable table2 = createTableWithColumns("tbl", 2);
new DBForeignKeyConstraint("fk1", false, table2, new String[] { "col2" }, target, new String[] { "col2" });
SchemaChange schemaChange = new SchemaChange(config);
// when comparing the tables
new TableComparator(config).compareObjects(table1, table2, schemaChange);
// then the result must be a foreign key creation