X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=script%2Fsqlt;h=9c19bce286bb51c68455055491df324039a5638e;hb=d1ca5a5cb007ddb2f361d314ae4c26ddd4308aa4;hp=01870b0f00eb4c3e5393f4b680e91de69842322e;hpb=9d35bb6b9b48b3cd9d4466aae5c792869edd05d6;p=dbsrgits%2FSQL-Translator.git diff --git a/script/sqlt b/script/sqlt index 01870b0..9c19bce 100755 --- a/script/sqlt +++ b/script/sqlt @@ -51,7 +51,7 @@ To translate a schema: 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 + --ignore_opts Comma-separated list of table options to ignore DBI Parser Options: @@ -202,8 +202,8 @@ my $mysql_version; # MySQL version GetOptions( 'add-drop-table' => \$add_drop_table, - 'quote_table_names' => \$quote_table_names, - 'quote_field_names' => \$quote_field_names, + 'quote-table-names|quote_table_names' => \$quote_table_names, + 'quote-field-names|quote_field_names' => \$quote_field_names, 'd|debug' => \$debug, 'f|from|parser:s' => \$from, 'fs:s' => \$field_separator, @@ -247,12 +247,12 @@ GetOptions( ) or pod2usage(2); if ($use_same_auth) { - $producer_dsn = $dsn; - $producer_db_user = $db_user; - $producer_db_password = $db_password; + $producer_dsn = $dsn; + $producer_db_user = $db_user; + $producer_db_password = $db_password; } -if ( +if ( ( !defined $from && defined $dsn ) || $from =~ /^DBI.*/ @@ -277,7 +277,7 @@ if ( $show_version ) { exit(0); } -my $translator = SQL::Translator->new( +my $translator = SQL::Translator->new( debug => $debug || 0, trace => $trace || 0, no_comments => $no_comments || 0, @@ -318,7 +318,7 @@ my $translator = SQL::Translator->new( newlines => $newlines, postgres_version => $postgres_version, mysql_version => $mysql_version, - package_name => $package_name, + package_name => $package_name, }, ); @@ -345,7 +345,7 @@ $translator->parser($from); $translator->producer($to); for my $file (@files) { - my @args = + my @args = ($file eq '-') ? (data => \*STDIN) : ($file eq '!') ? (data => '') : (file => $file);