diff -r 93450b43e627 -r cb7e13711a99 schemadiff.py --- a/schemadiff.py Mon Nov 14 18:00:53 2011 +0100 +++ b/schemadiff.py Mon Nov 21 10:43:37 2011 +0100 @@ -9,6 +9,7 @@ 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() @@ -24,7 +25,10 @@ if self.args.table: pgd.filter_tables(include=self.args.table) - pgd.print_diff() + if self.args.sql: + pgd.print_patch() + else: + pgd.print_diff() tool = SchemaDiffTool()