--- a/schemadiff.py Thu Dec 13 17:15:10 2012 +0100
+++ b/schemadiff.py Mon Dec 17 16:48:12 2012 +0100
@@ -11,23 +11,23 @@
class SchemaDiffTool(toolbase.SrcDstTool):
def __init__(self):
- toolbase.SrcDstTool.__init__(self, name='schemadiff', desc='Database schema diff.')
-
+ toolbase.SrcDstTool.__init__(self, name='schemadiff', desc='Database schema diff.', allow_reverse = True)
+
self.parser.add_argument('-s', dest='schema', nargs='*', help='Schema filter')
self.parser.add_argument('-t', dest='table', nargs='*', help='Table filter')
self.parser.add_argument('--sql', action='store_true', help='Output is SQL script.')
-
+
self.init()
def main(self):
srcbrowser = pgbrowser.PgBrowser(self.pgm.get_conn('src'))
dstbrowser = pgbrowser.PgBrowser(self.pgm.get_conn('dst'))
-
+
pgd = pgdiff.PgDiff(srcbrowser, dstbrowser)
if self.args.schema:
pgd.filter_schemas(include=self.args.schema)
-
+
if self.args.table:
pgd.filter_tables(include=self.args.table)