pgtoolkit/pgdatadiff.py
changeset 14 a900bc629ecc
parent 12 203be9022b46
child 27 5fb4883604d6
--- a/pgtoolkit/pgdatadiff.py	Fri Sep 09 11:56:37 2011 +0200
+++ b/pgtoolkit/pgdatadiff.py	Thu Oct 20 13:54:35 2011 +0200
@@ -186,7 +186,7 @@
         
         '''
         for ln in self.iter_diff():
-            print(ln.format_patch(self.fulltable2))
+            print(ln.format_patch(self.fulltable1))
 
     def _select(self):
         browser = pgbrowser.PgBrowser(self.conn1)
@@ -221,7 +221,8 @@
     def _compare_row(self, row1, row2):
         if row2 is None:
             cols1 = OrderedDict(zip(self.colnames, row1))
-            return DiffData('-', cols1, None)
+            id = (self.colnames[0], row1[0])
+            return DiffData('-', cols1, None, id=id)
         if row1 is None:
             cols2 = OrderedDict(zip(self.colnames, row2))
             return DiffData('+', None, cols2)