From: Luke Saunders Date: Wed, 27 Feb 2008 15:11:21 +0000 (+0000) Subject: increased sqlt rev dep X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6d9f089c019e7d613f97ef4c8384715c1d5cfdc;p=dbsrgits%2FDBIx-Class-Historic.git increased sqlt rev dep --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 150c3c9..197f4ac 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -179,7 +179,7 @@ sub backup $self->storage->backup($self->backup_directory()); } -# is this just a waste of time? +# is this just a waste of time? if not then merge with DBI.pm sub _create_db_to_schema_diff { my $self = shift; @@ -193,8 +193,10 @@ sub _create_db_to_schema_diff { return; } - require SQL::Translator; - require SQL::Translator::Diff; + eval 'require SQL::Translator "0.09"'; + if ($@) { + $self->throw_exception("SQL::Translator 0.09 required"); + } my $db_tr = SQL::Translator->new({ add_drop_table => 1, diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index c14d9a4..3b9c10c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1329,7 +1329,7 @@ sub create_ddl_dir $version ||= $schema->VERSION || '1.x'; $sqltargs = { ( add_drop_table => 1 ), %{$sqltargs || {}} }; - $self->throw_exception(q{Can't create a ddl file without SQL::Translator 0.08: '} + $self->throw_exception(q{Can't create a ddl file without SQL::Translator 0.09: '} . $self->_check_sqlt_message . q{'}) if !$self->_check_sqlt_version; @@ -1484,7 +1484,7 @@ sub deployment_statements { return join('', @rows); } - $self->throw_exception(q{Can't deploy without SQL::Translator 0.08: '} + $self->throw_exception(q{Can't deploy without SQL::Translator 0.09: '} . $self->_check_sqlt_message . q{'}) if !$self->_check_sqlt_version; @@ -1569,7 +1569,7 @@ sub build_datetime_parser { my $_check_sqlt_message; # private sub _check_sqlt_version { return $_check_sqlt_version if defined $_check_sqlt_version; - eval 'use SQL::Translator "0.08"'; + eval 'use SQL::Translator "0.09"'; $_check_sqlt_message = $@ || ''; $_check_sqlt_version = !$@; }