def try_diff3(): schema = DBSchema('First') table1 = DBTable('table1') table1.fields = [DBField('id', primary_key=True)] table2 = DBTable('table2') table2.fields = [DBField('id'), DBField('name')] schema.tables = [table1, table2] schema2 = DBSchema('Second') table3 = DBTable('table3', aka='table2') table3.fields = [DBField('xxx', aka='name'), DBField('yyy', aka='')] schema2.tables = [table1, table3] print unicode(TreeDiff(schema, schema2))