From: Matt S Trout Date: Sun, 20 Aug 2006 04:17:17 +0000 (+0000) Subject: Merge 'trunk' into 'DBIx-Class-current' X-Git-Tag: v0.08010~43^2~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f6e30eee38ebbf4e1b636cdfbea06333741685a;p=dbsrgits%2FDBIx-Class.git Merge 'trunk' into 'DBIx-Class-current' r26007@cain (orig r2674): matthewt | 2006-08-08 11:32:42 +0000 tweaked search_rs to not be destructive to passed r26476@cain (orig r2675): nigel | 2006-08-08 12:05:39 +0000 Test for search_rs destructive effects on attributes - see fix in [2674] r26477@cain (orig r2676): blblack | 2006-08-08 13:53:55 +0000 adding draft of pod index generator based on zby script r26478@cain (orig r2677): blblack | 2006-08-09 03:29:12 +0000 bump Alg::C3 req to 0.03 r26479@cain (orig r2678): blblack | 2006-08-09 17:05:33 +0000 backport the DBIx::Class::Storage::DBI::DESTROY fix for peopel sharing $dbh to other code r26483@cain (orig r2682): dyfrgi | 2006-08-10 18:22:05 +0000 Support for relationship attributes in many_to_many accessors. Merge new where condition, old where condition, cond in ResultSet::search_rs Collapse cond in ResultSet::new_result so that it doesn't try to create columns with names like "-and". Add a bunch of tests for the where condition things, which also happen to require the cond collapsing. Create supporting classes and associated tables for these tests. r26484@cain (orig r2683): dyfrgi | 2006-08-10 19:49:02 +0000 Support default aliases in many_to_many accessors. Update where test classes to use this. Remove warning about pseudohashes with array ref where/cond in ResultSet::search_rs. r26485@cain (orig r2684): gphat | 2006-08-11 21:13:50 +0000 Move unless to next line to prevent stabbings. r26532@cain (orig r2685): blblack | 2006-08-14 16:38:04 +0000 added sth method to Storage::DBI::NoBindVars, updated related docs r26533@cain (orig r2686): blblack | 2006-08-14 16:41:03 +0000 Alg::C3 req bump to 0.04 r26534@cain (orig r2687): ash | 2006-08-14 17:20:50 +0000 Changed the docs for relationship attributes, and added rel order_by example to cookbook. r26535@cain (orig r2688): jester | 2006-08-16 15:22:37 +0000 minor doc clarifications r26549@cain (orig r2689): castaway | 2006-08-17 18:59:09 +0000 Added recent Changes r26550@cain (orig r2690): castaway | 2006-08-18 10:58:27 +0000 Update to 0.07001 r26551@cain (orig r2691): castaway | 2006-08-18 11:00:24 +0000 Assume scalar refs need fetching in PK::Auto (to allow \'DEFAULT' Add RowNumberOver for limits with DB2 r26552@cain (orig r2692): castaway | 2006-08-18 11:03:25 +0000 Allow deploy to supply a directory for the SQL file to deploy from (Penguin) r26553@cain (orig r2693): castaway | 2006-08-18 18:52:59 +0000 0.07001 released r26554@cain (orig r2694): claco | 2006-08-20 04:16:30 +0000 remove_columns now deletes columns from _columns fixing has_columns false positives --- 0f6e30eee38ebbf4e1b636cdfbea06333741685a diff --cc lib/DBIx/Class/Storage/DBI.pm index d2da6bc,6cfc4b8..8d2956b --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@@ -1048,9 -1059,17 +1074,9 @@@ sub deployment_statements } -=head2 deploy - -Sends the appropriate statements to create or modify tables to the -db. This would normally be called through -L. - -=cut - sub deploy { - my ($self, $schema, $type, $sqltargs) = @_; - foreach my $statement ( $self->deployment_statements($schema, $type, undef, undef, { no_comments => 1, %{ $sqltargs || {} } } ) ) { + my ($self, $schema, $type, $sqltargs, $dir) = @_; + foreach my $statement ( $self->deployment_statements($schema, $type, undef, $dir, { no_comments => 1, %{ $sqltargs || {} } } ) ) { for ( split(";\n", $statement)) { next if($_ =~ /^--/); next if(!$_); @@@ -1100,10 -1119,14 +1126,9 @@@ sub build_datetime_parser } sub DESTROY { - # NOTE: if there's a merge conflict here when -current is pushed - # back to trunk, take -current's version and ignore this trunk one :) my $self = shift; - - if($self->_dbh && $self->_conn_pid != $$) { - $self->_dbh->{InactiveDestroy} = 1; - } - + return if !$self->_dbh; - + $self->_verify_pid; $self->_dbh(undef); }