From: Dagfinn Ilmari Mannsåker Date: Tue, 10 Mar 2009 12:37:47 +0000 (+0000) Subject: Merge 'trunk' into 'current' X-Git-Tag: 0.04999_07~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c7e99dbe562be249a8f58ba5570f5effeede6f9;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Merge 'trunk' into 'current' r27903@fenchurch (orig r4475): ilmari | 2008-06-08 14:18:48 +0100 Fix Oracle constraint detection for non-owned schemas r37690@fenchurch (orig r5722): timbunce | 2009-03-09 21:02:02 +0000 Implement result_base_class and schema_base_class options. r37693@fenchurch (orig r5725): timbunce | 2009-03-09 21:36:21 +0000 Fix test plan count in t/23dumpmore.t and add Change note missed from r5722 r37694@fenchurch (orig r5726): timbunce | 2009-03-09 21:40:30 +0000 Reduce noise when running tests if Test::Kwalitee isn't installed. --- 6c7e99dbe562be249a8f58ba5570f5effeede6f9 diff --cc Changes index 20451da,eb010bb..1d52a89 --- a/Changes +++ b/Changes @@@ -1,48 -1,11 +1,51 @@@ Revision history for Perl extension DBIx::Class::Schema::Loader -0.04006 Not Yet Released - - Fix Oracle constraint detection for non-owned schemas (RT #35732) ++0.04999_07 Not Yet Released + - Add result_base_class and schema_base_class options (RT #43977) + -0.04005 Sat Apr 05, 2008 +0.04999_06 Tue Nov 11, 2008 + - Singularise table monikers by default + - Strip trailing _id from single-column belongs_to relationships + - Add "dbicdump" script for easy commandline dumping + - Throw out the in-memory class generation, just dump to a temporary + directory if the user didn't specify one + - Fix Oracle constraint and auto-increment detection for non-owned schemas + (RT #35732) + - Handle ResultSetManager deprecation warning in common tests + +0.04999_05 Mon Apr 14, 2008 + - Fix limiting table list to the specified schema for DB2 + - Default db_schema to the username for DB2 + - Allow specifying a custom loader_class, overriding the + storage_type-based detection + - Cosmetic fixes to dumping of externally defined classes + - Make ResultSetManager notice externally defined :ResultSet methods + - Fix test failure for non-InnoDB MySQL due to wrong skip count + - Fix base class ordering in dumped classes + - Run the common tests against both dynamic and dumped versions of + the schema + +0.04999_04 Wed Mar 12, 2008 + - Add is_auto_increment detecton for DB2 + +0.04999_03 Wed Mar 12, 2008 - Fix DB2 support + +0.04999_02 Tue Feb 12, 2008 + - Add is_auto_increment detection for Oracle + - Unnhide the Oracle module now that the CPAN perms are sorted + out. Thanks to Tsunoda Kazuya for the quick response. + +0.04999_01 Tue Feb 5, 2008 + - Mark foreign key columns with is_foreign_key => 1 + - Add support for vendor-specific extra column attributes. + - Add support for extra => { unsigned => 1 } for MySQL. + - Add support for enum value lists for MySQL + - Set join_type => 'LEFT OUTER' for nullable foreign keys + (patch from Bernhard Weißhuhn) + - Set is_auto_increment for auto-increment columns (RT #31473) + (Only SQLite, MySQL and PostgreSQL are currently supported) + - Generate one-to-one accessors for unique foreign keys (ilmari) - Add support for load_namespaces-style class layout - Fix test skip count for main skip_rels block - Fix auto-inc column creation for the Oracle tests diff --cc lib/DBIx/Class/Schema/Loader/Base.pm index e9198f5,c6b89dd..13c6bae --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@@ -462,9 -455,11 +472,10 @@@ sub _dump_to_dir my $target_dir = $self->dump_directory; my $schema_class = $self->schema_class; + my $schema_base_class = $self->schema_base_class || 'DBIx::Class::Schema'; - croak "Must specify target directory for dumping!" if ! $target_dir; - - warn "Dumping manual schema for $schema_class to directory $target_dir ...\n"; + warn "Dumping manual schema for $schema_class to directory $target_dir ...\n" + unless $self->{dynamic} or $self->{quiet}; my $schema_text = qq|package $schema_class;\n\n| @@@ -492,7 -487,9 +503,9 @@@ $self->_write_classfile($schema_class, $schema_text); + my $result_base_class = $self->result_base_class || 'DBIx::Class'; + - foreach my $src_class (sort keys %{$self->{_dump_storage}}) { + foreach my $src_class (@classes) { my $src_text = qq|package $src_class;\n\n| . qq|use strict;\nuse warnings;\n\n| diff --cc t/23dumpmore.t index d9efd36,6455ad0..8c0c5b0 --- a/t/23dumpmore.t +++ b/t/23dumpmore.t @@@ -8,7 -7,7 +8,7 @@@ require DBIx::Class::Schema::Loader $^O eq 'MSWin32' ? plan(skip_all => "ActiveState perl produces additional warnings, and this test uses unix paths") - : plan(tests => 140); - : plan(tests => 85); ++ : plan(tests => 143); my $DUMP_PATH = './t/_dump';