From: Peter Rabbitson Date: Sat, 6 Mar 2010 11:44:58 +0000 (+0000) Subject: Fix RT54063 X-Git-Tag: v0.08121~82 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=c2ecf953198fc6c43edae1b39de4cc86debcb11b;hp=8ed83bc8f530a800bf5402f021ce39ef7213d41e Fix RT54063 --- diff --git a/Changes b/Changes index b07d38c..d4bced8 100644 --- a/Changes +++ b/Changes @@ -1,12 +1,17 @@ Revision history for DBIx::Class + - DBIx::Class::InflateColumn::File entered deprecated state - Fix regression where SQL files with comments were not handled properly by ::Schema::Versioned. - Fix regression on not properly throwing when $obj->relationship is unresolvable - Add has_relationship method to row objects - Fix regression in set_column on PK-less objects - - Fix for SQLite to ignore the { for => ... } attribute + - Add POD about the significance of PK columns + - Fix for SQLite to ignore the (unsupported) { for => ... } + attribute + - Fix ambiguity in default directory handling of create_ddl_dir + (RT#54063) 0.08120 2010-02-24 08:58:00 (UTC) - Make sure possibly overwritten deployment_statements methods in @@ -41,7 +46,6 @@ Revision history for DBIx::Class 0.08117 2010-02-05 17:10:00 (UTC) - Perl 5.8.1 is now the minimum supported version - - DBIx::Class::InflateColumn::File entered deprecated state - Massive optimization of the join resolution code - now joins will be removed from the resulting SQL if DBIC can prove they are not referenced by anything diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index f1039d3..7400316 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -2252,10 +2252,13 @@ them. sub create_ddl_dir { my ($self, $schema, $databases, $version, $dir, $preversion, $sqltargs) = @_; - if(!$dir || !-d $dir) { + unless ($dir) { carp "No directory given, using ./\n"; - $dir = "./"; + $dir = './'; } + + $self->throw_exception ("Directory '$dir' does not exist\n") unless(-d $dir); + $databases ||= ['MySQL', 'SQLite', 'PostgreSQL']; $databases = [ $databases ] if(ref($databases) ne 'ARRAY');