Release 0.09005
[dbsrgits/SQL-Translator.git] / bin / sqlt
index afc05e7..5d4eccc 100755 (executable)
--- a/bin/sqlt
+++ b/bin/sqlt
@@ -1,10 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # vim: set ft=perl:
 
 # -------------------------------------------------------------------
-# $Id: sqlt,v 1.22 2007-03-21 15:21:31 duality72 Exp $
-# -------------------------------------------------------------------
-# Copyright (C) 2002-4 SQLFairy Authors
+# Copyright (C) 2002-2009 SQLFairy Authors
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -50,6 +48,11 @@ To translate a schema:
     --trace            Print parser trace info
     --show-warnings    Print warnings to STDERR
 
+  General Parser Options:
+
+    --skip             Comma-separated list of tables to skip (only implemented in some parsers)
+    --ignore_opts      Comma-separated list of table options to ignore 
+
   DBI Parser Options:
 
     --dsn              DSN for connecting to database
@@ -144,12 +147,13 @@ knows about, allowing you to easily substitute your own.
 # -------------------------------------------------------------------
 
 use strict;
+use warnings;
 use Getopt::Long;
 use Pod::Usage;
 use SQL::Translator;
 
 use vars qw( $VERSION );
-$VERSION = sprintf "%d.%02d", q$Revision: 1.22 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.59';
 
 my $from;             # the original database
 my $to;               # the destination database
@@ -187,6 +191,7 @@ my $db_password;      # DBI parser
 my $show_version;     # Show version and exit script
 my $skip;
 my $skiplike;
+my $ignore_opts;
 my $producer_db_user; # DSN     for producer (e.g. Dumper, ClassDBI)
 my $producer_db_password; # db_pass "
 my $producer_dsn;     # db_user "
@@ -227,6 +232,7 @@ GetOptions(
     'producer-db-pass:s'=> \$producer_db_password,
     'skip:s'           => \$skip,
     'skiplike:s'       => \$skiplike,
+    'ignore_opts:s'    => \$ignore_opts,
     'add_truncate'     => \$add_truncate,
     'add-prefix'       => \$add_prefix,
     'prefix:s'         => \$prefix,
@@ -282,6 +288,8 @@ my $translator           =  SQL::Translator->new(
         db_user          => $db_user,
         db_password      => $db_password,
         mysql_parser_version => $mysql_parser_version,
+        skip => $skip,
+        ignore_opts => $ignore_opts,
     },
     producer_args   => {
         imap_file        => $imap_file,