package SQL::Translator::Parser::DBI::MySQL;
# -------------------------------------------------------------------
-# $Id: MySQL.pm,v 1.6 2006-02-22 22:52:51 kycl4rk 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
use SQL::Translator::Parser::MySQL;
use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.59';
$DEBUG = 0 unless defined $DEBUG;
# -------------------------------------------------------------------
my ( $tr, $dbh ) = @_;
my $schema = $tr->schema;
my @table_names = @{ $dbh->selectcol_arrayref('show tables') };
+ my @skip_tables = defined $tr->parser_args->{skip}?split(/,/, $tr->parser_args->{skip}):();
$dbh->{'FetchHashKeyName'} = 'NAME_lc';
my $create;
for my $table_name ( @table_names ) {
+ next if (grep /^$table_name$/, @skip_tables);
my $sth = $dbh->prepare("show create table $table_name");
$sth->execute;
my $table = $sth->fetchrow_hashref;