restore missing table header for column diffs
This commit is contained in:
parent
91e887b081
commit
8e5eb8f634
@ -58,7 +58,9 @@ class Test_getDiffOfModelAgainstDatabase(fixture.DB):
|
||||
# run diff
|
||||
diff = self._run_diff()
|
||||
self.assertTrue(diff)
|
||||
eq_('Schema diffs:\n xtable missing columns from database: xcol',
|
||||
eq_('Schema diffs:\n'
|
||||
' table with differences: xtable\n'
|
||||
' database missing these columns: xcol',
|
||||
str(diff))
|
||||
|
||||
@fixture.usedb()
|
||||
@ -75,7 +77,9 @@ class Test_getDiffOfModelAgainstDatabase(fixture.DB):
|
||||
# run diff
|
||||
diff = self._run_diff()
|
||||
self.assertTrue(diff)
|
||||
eq_('Schema diffs:\n xtable missing columns from model: xcol',
|
||||
eq_('Schema diffs:\n'
|
||||
' table with differences: xtable\n'
|
||||
' model missing these columns: xcol',
|
||||
str(diff))
|
||||
|
||||
@fixture.usedb()
|
||||
|
@ -166,14 +166,17 @@ class SchemaDiff(object):
|
||||
)
|
||||
|
||||
for name,td in sorted(self.tables_different.items()):
|
||||
out.append(
|
||||
' table with differences: %s' % name
|
||||
)
|
||||
for names,label in (
|
||||
(td.columns_missing_from_A,self.labelA),
|
||||
(td.columns_missing_from_B,self.labelB),
|
||||
):
|
||||
if names:
|
||||
out.append(
|
||||
' %s missing columns from %s: %s' % (
|
||||
name, label,', '.join(sorted(names))
|
||||
' %s missing these columns: %s' % (
|
||||
label,', '.join(sorted(names))
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user