Hello community,

here is the log from the commit of package perl-DBIx-Class-Schema-Loader for 
openSUSE:Factory checked in at 2016-09-11 00:55:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DBIx-Class-Schema-Loader (Old)
 and      /work/SRC/openSUSE:Factory/.perl-DBIx-Class-Schema-Loader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-DBIx-Class-Schema-Loader"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-DBIx-Class-Schema-Loader/perl-DBIx-Class-Schema-Loader.changes
      2016-02-17 12:19:36.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-DBIx-Class-Schema-Loader.new/perl-DBIx-Class-Schema-Loader.changes
 2016-09-11 00:55:32.000000000 +0200
@@ -1,0 +2,13 @@
+Tue Sep  6 05:13:23 UTC 2016 - [email protected]
+
+- updated to 0.07046
+   see /usr/share/doc/packages/perl-DBIx-Class-Schema-Loader/Changes
+
+  0.07046  2016-09-05
+          - Introspect view definitions for PostgreSQL, MySQL, Oracle,
+            Firebird, and InterBase.
+          - When a file's md5sum was wrong but no other content in the file had
+            changed, it would not be rewritten even when 
overwrite_modifications
+            was true. Fixed by Dave Rolsky. GH #8.
+
+-------------------------------------------------------------------

Old:
----
  DBIx-Class-Schema-Loader-0.07045.tar.gz

New:
----
  DBIx-Class-Schema-Loader-0.07046.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-DBIx-Class-Schema-Loader.spec ++++++
--- /var/tmp/diff_new_pack.ythLsZ/_old  2016-09-11 00:55:33.000000000 +0200
+++ /var/tmp/diff_new_pack.ythLsZ/_new  2016-09-11 00:55:33.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-DBIx-Class-Schema-Loader
-Version:        0.07045
+Version:        0.07046
 Release:        0
 %define cpan_name DBIx-Class-Schema-Loader
 Summary:        Create a DBIx::Class::Schema based on a database

++++++ DBIx-Class-Schema-Loader-0.07045.tar.gz -> 
DBIx-Class-Schema-Loader-0.07046.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBIx-Class-Schema-Loader-0.07045/Changes 
new/DBIx-Class-Schema-Loader-0.07046/Changes
--- old/DBIx-Class-Schema-Loader-0.07045/Changes        2016-01-22 
16:54:24.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/Changes        2016-09-05 
13:36:22.000000000 +0200
@@ -1,5 +1,12 @@
 Revision history for Perl extension DBIx::Class::Schema::Loader
 
+0.07046  2016-09-05
+        - Introspect view definitions for PostgreSQL, MySQL, Oracle,
+          Firebird, and InterBase.
+        - When a file's md5sum was wrong but no other content in the file had
+          changed, it would not be rewritten even when overwrite_modifications
+          was true. Fixed by Dave Rolsky. GH #8.
+
 0.07045  2016-01-22
         - Regenerate tarball without author-mode test dependencies
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBIx-Class-Schema-Loader-0.07045/META.yml 
new/DBIx-Class-Schema-Loader-0.07046/META.yml
--- old/DBIx-Class-Schema-Loader-0.07045/META.yml       2016-01-22 
16:55:15.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/META.yml       2016-09-05 
14:07:46.000000000 +0200
@@ -56,4 +56,4 @@
   MailingList: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
   license: http://dev.perl.org/licenses/
   repository: https://github.com/dbsrgits/dbix-class-schema-loader
-version: '0.07045'
+version: '0.07046'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBIx-Class-Schema-Loader-0.07045/Makefile.PL 
new/DBIx-Class-Schema-Loader-0.07046/Makefile.PL
--- old/DBIx-Class-Schema-Loader-0.07045/Makefile.PL    2015-06-25 
12:49:53.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/Makefile.PL    2016-06-27 
13:54:40.000000000 +0200
@@ -84,8 +84,16 @@
 EOF
 
 if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) {
-    eval { require Module::Install::ReadmeFromPod }
-        or die "\nYou need Module::Install::ReadmeFromPod installed to run 
this Makefile.PL in author mode:\n\n$@\n";
+    my @missing_plugins;
+    for my $plugin (qw(ReadmeFromPod AuthorTests)) {
+        eval "require Module::Install::$plugin" and next;
+        push @missing_plugins, "Module::Install::$plugin";
+        chomp(my $err = $@);
+        $missing_plugins[-1] .= " ($err)"
+            unless $err =~ m{^Can't locate Module/Install/$plugin.pm in \@INC};
+    }
+    die "\nYou need to install the following modules to run this Makefile.PL 
in author mode:\n\n", join("\n", @missing_plugins), "\n\n"
+        if @missing_plugins;
 
     warn "\n*** AUTHOR MODE: some optional dependencies converted to hard 
requires.\n\n";
 
@@ -104,6 +112,14 @@
     author_tests( 'xt' );
     readme_from( 'lib/DBIx/Class/Schema/Loader.pm' );
     realclean_files( qw[README MANIFEST 
lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod] );
+    postamble <<EOP;
+create_distdir: author_stop_distdir_creation
+author_stop_distdir_creation:
+\t\$(NOECHO) \$(ECHO) Creation of dist with author mode deps not allowed
+\t\$(NOECHO) \$(ECHO) Please re-run Makefile.PL with --skip_author_deps
+\t\$(NOECHO) \$(FALSE)
+EOP
+
 }
 
 tests_recursive;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/Base.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/Base.pm
--- old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/Base.pm   
2016-01-22 16:54:14.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/Base.pm   
2016-09-05 13:33:20.000000000 +0200
@@ -30,7 +30,7 @@
 use File::Temp 'tempfile';
 use namespace::clean;
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 __PACKAGE__->mk_group_ro_accessors('simple', qw/
                                 schema
@@ -565,7 +565,7 @@
 
 Exclude matching tables.
 
-These can be specified either as a regex (preferrably on the C<qr//>
+These can be specified either as a regex (preferably on the C<qr//>
 form), or as an arrayref of arrayrefs.  Regexes are matched against
 the (unqualified) table name, while arrayrefs are matched according to
 L</moniker_parts>.
@@ -1985,7 +1985,8 @@
 
         my @attr = qw/resultset_namespace default_resultset_class/;
 
-        unshift @attr, 'result_namespace' unless (not $self->result_namespace) 
|| $self->result_namespace eq 'Result';
+        unshift @attr, 'result_namespace'
+            if $self->result_namespace && $self->result_namespace ne 'Result';
 
         for my $attr (@attr) {
             if ($self->$attr) {
@@ -2252,9 +2253,16 @@
 
             $gen .= $pre_md5;
             $real_md5 = Digest::MD5::md5_base64(encode 'UTF-8', $gen);
-            croak "Checksum mismatch in '$fn', the auto-generated part of the 
file has been modified outside of this loader.  Aborting.\nIf you want to 
overwrite these modifications, set the 'overwrite_modifications' loader 
option.\n"
-                if !$self->overwrite_modifications && $real_md5 ne $mark_md5;
-
+            if ($real_md5 ne $mark_md5) {
+                if ($self->overwrite_modifications) {
+                    # Setting this to something that is not a valid MD5 forces
+                    # the file to be rewritten.
+                    $real_md5 = 'not an MD5';
+                }
+                else {
+                    croak "Checksum mismatch in '$fn', the auto-generated part 
of the file has been modified outside of this loader.  Aborting.\nIf you want 
to overwrite these modifications, set the 'overwrite_modifications' loader 
option.\n";
+                }
+            }
             last;
         }
         else {
@@ -2570,6 +2578,8 @@
     return 0;
 }
 
+sub _view_definition { undef }
+
 # Set up metadata (cols, pks, etc)
 sub _setup_src_meta {
     my ($self, $table) = @_;
@@ -2580,11 +2590,17 @@
     my $table_class   = $self->classes->{$table->sql_name};
     my $table_moniker = $self->monikers->{$table->sql_name};
 
+    # Must come before ->table
     $self->_dbic_stmt($table_class, 'table_class', 
'DBIx::Class::ResultSource::View')
-        if $self->_table_is_view($table);
+        if my $is_view = $self->_table_is_view($table);
 
     $self->_dbic_stmt($table_class, 'table', $table->dbic_name);
 
+    # Must come after ->table
+    if ($is_view and my $view_def = $self->_view_definition($table)) {
+        $self->_dbic_stmt($table_class, 
'result_source_instance->view_definition', $view_def);
+    }
+
     my $cols     = $self->_table_columns($table);
     my $col_info = $self->__columns_info_for($table);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO/MS_Jet.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO/MS_Jet.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO/MS_Jet.pm
 2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO/MS_Jet.pm
 2016-09-05 13:33:20.000000000 +0200
@@ -10,7 +10,7 @@
 use Try::Tiny;
 use namespace::clean;
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm
   2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm
   2016-09-05 13:33:20.000000000 +0200
@@ -11,7 +11,7 @@
 
 use namespace::clean;
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ADO.pm    
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ADO.pm    
    2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
    2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm    
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm    
    2016-09-05 13:33:20.000000000 +0200
@@ -13,7 +13,7 @@
 
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Firebird.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Firebird.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Firebird.pm
   2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Firebird.pm
   2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base qw/DBIx::Class::Schema::Loader::DBI::InterBase/;
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm
   2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm
   2016-09-05 13:33:20.000000000 +0200
@@ -10,7 +10,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table::Informix ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm
  2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm
  2016-09-05 13:33:20.000000000 +0200
@@ -9,7 +9,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 sub _supports_db_schema { 0 }
 
@@ -310,6 +310,16 @@
     return $result;
 }
 
+sub _view_definition {
+    my ($self, $view) = @_;
+
+    return scalar $self->schema->storage->dbh->selectrow_array(<<'EOF', {}, 
$view->name);
+SELECT rdb$view_source
+FROM rdb$relations
+WHERE rdb$relation_name = ?
+EOF
+}
+
 =head1 SEE ALSO
 
 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm  
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm  
    2016-09-05 13:33:20.000000000 +0200
@@ -10,7 +10,7 @@
 
 use DBIx::Class::Schema::Loader::Table::Sybase ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/ACCESS.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 __PACKAGE__->mk_group_accessors('simple', qw/
     __ado_connection
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm
      2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm
      2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 /;
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
  2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm
  2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 /;
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm
  2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm
  2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 /;
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm   
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm   
    2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 
    2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 use DBIx::Class::Schema::Loader::Utils qw/sigwarn_silencer/;
 use namespace::clean;
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
@@ -409,6 +409,16 @@
     return $self->next::method(@_);
 }
 
+sub _view_definition {
+    my ($self, $view) = @_;
+
+    return scalar $self->schema->storage->dbh->selectrow_array(<<'EOF', {}, 
$view->schema, $view->name);
+SELECT text
+FROM all_views
+WHERE owner = ? AND view_name = ?
+EOF
+}
+
 =head1 SEE ALSO
 
 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
--- old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 
2016-01-22 16:54:14.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 
2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
@@ -342,6 +342,22 @@
     return $result;
 }
 
+sub _view_definition {
+    my ($self, $view) = @_;
+
+    my $def =  $self->schema->storage->dbh->selectrow_array(<<'EOF', {}, 
$view->schema, $view->name);
+SELECT pg_catalog.pg_get_viewdef(oid)
+FROM pg_catalog.pg_class
+WHERE relnamespace = (SELECT OID FROM pg_catalog.pg_namespace WHERE nspname = 
?)
+AND relname = ?
+EOF
+    # The definition is returned as a complete statement including the
+    # trailing semicolon, but that's not allowed in CREATE VIEW, so
+    # strip it out
+    $def =~ s/\s*;\s*\z//;
+    return $def;
+}
+
 =head1 SEE ALSO
 
 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm 
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm 
    2016-09-05 13:33:20.000000000 +0200
@@ -6,7 +6,7 @@
 use mro 'c3';
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm
      2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm
      2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::DBI::MSSQL';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm 
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm 
    2016-09-05 13:33:20.000000000 +0200
@@ -9,7 +9,7 @@
 
 use DBIx::Class::Schema::Loader::Table::Sybase ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
    2016-09-05 13:33:20.000000000 +0200
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 # Empty. POD only.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm  
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm  
    2016-09-05 13:33:20.000000000 +0200
@@ -12,7 +12,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 =head1 NAME
 
@@ -363,6 +363,18 @@
     return $comment;
 }
 
+sub _view_definition {
+    my ($self, $view) = @_;
+
+    return scalar $self->schema->storage->dbh->selectrow_array(
+        q{SELECT view_definition
+            FROM information_schema.views
+           WHERE table_schema = schema()
+             AND table_name = ?
+        }, undef, $view->name,
+    );
+}
+
 =head1 SEE ALSO
 
 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI.pm
--- old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/DBI.pm    
2016-01-22 16:54:14.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/DBI.pm    
2016-09-05 13:33:20.000000000 +0200
@@ -10,7 +10,7 @@
 use namespace::clean;
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 __PACKAGE__->mk_group_accessors('simple', qw/
     _disable_pk_detection
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm
       2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm
       2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_05';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 sub _relnames_and_method {
     my ( $self, $local_moniker, $rel, $cond, $uniqs, $counters ) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -8,7 +8,7 @@
 use namespace::clean;
 use Lingua::EN::Inflect::Number ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 sub _to_PL {
     my ($self, $name) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -5,7 +5,7 @@
 use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_07';
 use mro 'c3';
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 sub _normalize_name {
     my ($self, $name) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_07.pm
 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_07.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_07.pm
        2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_07.pm
        2016-09-05 13:33:20.000000000 +0200
@@ -17,7 +17,7 @@
 
 =cut
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 sub _strip_id_postfix {
     my ($self, $name) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder.pm
--- 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader/RelBuilder.pm 
    2016-01-22 16:54:14.000000000 +0100
+++ 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader/RelBuilder.pm 
    2016-09-05 13:33:20.000000000 +0200
@@ -17,7 +17,7 @@
 use Class::Unload ();
 use Class::Inspector ();
 
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 # Glossary:
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader.pm 
new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader.pm
--- old/DBIx-Class-Schema-Loader-0.07045/lib/DBIx/Class/Schema/Loader.pm        
2016-01-22 16:54:14.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/lib/DBIx/Class/Schema/Loader.pm        
2016-09-05 13:33:20.000000000 +0200
@@ -16,7 +16,7 @@
 # Always remember to do all digits for the version even if they're 0
 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
 # brain damage and presumably various other packaging systems too
-our $VERSION = '0.07045';
+our $VERSION = '0.07046';
 
 __PACKAGE__->mk_group_accessors('inherited', qw/
                                 _loader_args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/10_01sqlite_common.t 
new/DBIx-Class-Schema-Loader-0.07046/t/10_01sqlite_common.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/10_01sqlite_common.t 2015-06-25 
12:49:53.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/10_01sqlite_common.t 2016-02-22 
19:44:06.000000000 +0100
@@ -173,7 +173,7 @@
 
             # test that views are marked as such
             isa_ok 
$schema->resultset($monikers->{extra_loader_test5})->result_source, 
'DBIx::Class::ResultSource::View',
-                'views have table_class set correctly';
+                'view result source';
 
             isnt 
$schema->resultset($monikers->{extra_loader_test6})->result_source->column_info('id1')->{is_auto_increment},
 1,
                 q{two integer PKs don't get marked autoinc};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/10_02mysql_common.t 
new/DBIx-Class-Schema-Loader-0.07046/t/10_02mysql_common.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/10_02mysql_common.t  2015-06-25 
12:49:53.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/10_02mysql_common.t  2016-06-27 
13:54:38.000000000 +0200
@@ -205,7 +205,7 @@
         ],
         pre_drop_ddl => [ 'DROP VIEW mysql_loader_test2', ],
         drop => [ 'mysql_loader-test1', 'mysql_loader_test3', 
'mysql_loader_test11', 'mysql_loader_test12' ],
-        count => 9 + 30 * 2,
+        count => 10 + 30 * 2,   # regular + multi-schema * 2
         run => sub {
             my ($monikers, $classes);
             ($schema, $monikers, $classes) = @_;
@@ -219,8 +219,13 @@
                 'view introspected successfully';
 
             # test that views are marked as such
-            isa_ok 
$schema->resultset($monikers->{mysql_loader_test2})->result_source, 
'DBIx::Class::ResultSource::View',
-                'views have table_class set correctly';
+            my $view_source = 
$schema->resultset($monikers->{mysql_loader_test2})->result_source;
+            isa_ok $view_source, 'DBIx::Class::ResultSource::View',
+                'view result source';
+
+            like $view_source->view_definition,
+                qr/\A \s* select \b .* \b from \s+ `.*?` \. 
`mysql_loader-test1` \s* \z/imsx,
+                'view defintion';
 
             $rsrc = $schema->source('MysqlLoaderTest3');
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBIx-Class-Schema-Loader-0.07045/t/10_03pg_common.t 
new/DBIx-Class-Schema-Loader-0.07046/t/10_03pg_common.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/10_03pg_common.t     2015-09-18 
13:18:29.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/10_03pg_common.t     2016-06-27 
13:54:38.000000000 +0200
@@ -294,7 +294,7 @@
             'DROP VIEW pg_loader_test11',
         ],
         drop  => [ qw/pg_loader_test1 pg_loader_test2 pg_loader_test9 
pg_loader_test10 pg_loader_test12/ ],
-        count => 10 + 30 * 2,
+        count => 11 + 30 * 2,   # regular + multi-schema * 2
         run   => sub {
             my ($schema, $monikers, $classes) = @_;
 
@@ -490,8 +490,13 @@
             }
 
             # test that views are marked as such
-            isa_ok 
$schema->resultset($monikers->{pg_loader_test11})->result_source, 
'DBIx::Class::ResultSource::View',
-                'views have table_class set correctly';
+            my $view_source = 
$schema->resultset($monikers->{pg_loader_test11})->result_source;
+            isa_ok $view_source, 'DBIx::Class::ResultSource::View',
+                'view result source';
+
+            like $view_source->view_definition,
+                qr/\A \s* select\b .* \bfrom \s+ pg_loader_test1 \s* \z/imsx,
+                'view definition';
 
             is_deeply
                 { 
$schema->source($monikers->{pg_loader_test12})->unique_constraints },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DBIx-Class-Schema-Loader-0.07045/t/10_05ora_common.t 
new/DBIx-Class-Schema-Loader-0.07046/t/10_05ora_common.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/10_05ora_common.t    2015-06-25 
12:49:53.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/10_05ora_common.t    2016-06-27 
13:54:38.000000000 +0200
@@ -192,9 +192,13 @@
             },
             $auto_inc_cb->('oracle_loader_test11', 'id'),
             'alter trigger oracle_loader_test11_id_trg disable',
+            'CREATE VIEW oracle_loader_test12 AS SELECT * FROM 
oracle_loader_test1',
+        ],
+        pre_drop_ddl => [
+            'DROP VIEW oracle_loader_test12',
         ],
         drop  => [qw/oracle_loader_test1 oracle_loader_test9 
oracle_loader_test10 oracle_loader_test11/],
-        count => 10 + 31 * 2,  # basic + cross-schema * 2
+        count => 12 + 31 * 2,  # basic + cross-schema * 2
         run   => sub {
             my ($monikers, $classes);
             ($schema, $monikers, $classes) = @_;
@@ -247,6 +251,14 @@
             ok !$source11->column_info('id')->{is_auto_increment},
                 'Disabled autoinc trigger not loaded';
 
+            my $view_source = 
$schema->resultset($monikers->{oracle_loader_test12})->result_source;
+            isa_ok $view_source, 'DBIx::Class::ResultSource::View',
+                'view result source';
+
+            like $view_source->view_definition,
+                qr/\A \s* select\b .* \bfrom \s+ oracle_loader_test1 \s* 
\z/imsx,
+                'view definition';
+
             SKIP: {
                 skip 'Set the DBICTEST_ORA_EXTRAUSER_DSN, _USER and _PASS 
environment variables to run the cross-schema relationship tests', 31 * 2
                     unless $ENV{DBICTEST_ORA_EXTRAUSER_DSN};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/10_09firebird_common.t 
new/DBIx-Class-Schema-Loader-0.07046/t/10_09firebird_common.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/10_09firebird_common.t       
2015-06-25 12:49:51.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/10_09firebird_common.t       
2016-02-22 19:44:06.000000000 +0100
@@ -120,39 +120,46 @@
                       => { data_type => 'blob sub_type text character set 
unicode_fss' },
     },
     extra => {
-        count  => 9,
+        count  => 11,
+        create => [
+            q{
+                CREATE TABLE "Firebird_Loader_Test1" (
+                    "Id" INTEGER NOT NULL PRIMARY KEY,
+                    "Foo" INTEGER DEFAULT 42
+                )
+            },
+            q{
+                CREATE GENERATOR "Gen_Firebird_Loader_Test1_Id"
+            },
+            q{
+                CREATE TRIGGER "Firebird_Loader_Test1_BI" for 
"Firebird_Loader_Test1"
+                ACTIVE BEFORE INSERT POSITION 0
+                AS
+                BEGIN
+                 IF (NEW."Id" IS NULL) THEN
+                  NEW."Id" = GEN_ID("Gen_Firebird_Loader_Test1_Id",1);
+                END
+            },
+            q{
+                CREATE VIEW firebird_loader_test2 AS SELECT * FROM 
"Firebird_Loader_Test1"
+            },
+        ],
+        pre_drop_ddl => [
+            'DROP VIEW firebird_loader_test2',
+            'DROP TRIGGER "Firebird_Loader_Test1_BI"',
+            'DROP GENERATOR "Gen_Firebird_Loader_Test1_Id"',
+            'DROP TABLE "Firebird_Loader_Test1"',
+        ],
         run    => sub {
             $schema = shift;
             my ($monikers, $classes, $self) = @_;
 
-            cleanup_extra();
-
             my $dbh = $schema->storage->dbh;
 
 # create a mixed case table
             $dbh->do($_) for (
-q{
-    CREATE TABLE "Firebird_Loader_Test1" (
-        "Id" INTEGER NOT NULL PRIMARY KEY,
-        "Foo" INTEGER DEFAULT 42
-    )
-},
-q{
-    CREATE GENERATOR "Gen_Firebird_Loader_Test1_Id"
-},
-q{
-    CREATE TRIGGER "Firebird_Loader_Test1_BI" for "Firebird_Loader_Test1"
-    ACTIVE BEFORE INSERT POSITION 0
-    AS
-    BEGIN
-     IF (NEW."Id" IS NULL) THEN
-      NEW."Id" = GEN_ID("Gen_Firebird_Loader_Test1_Id",1);
-    END
-},
             );
 
-            my $guard = Scope::Guard->new(\&cleanup_extra);
-
             local $schema->loader->{preserve_case} = 1;
             $schema->loader->_setup;
 
@@ -172,6 +179,15 @@
 
             is eval { $rsrc->column_info('Foo')->{default_value} }, 42, 
'default_value detected for mixed case column';
 
+            # test that views are marked as such
+            my $view_source = 
$schema->resultset($monikers->{firebird_loader_test2})->result_source;
+            isa_ok $view_source, 'DBIx::Class::ResultSource::View',
+                'view result source';
+
+            like $view_source->view_definition,
+                qr/\A \s* select\b .* \bfrom \s+ (?-i:"Firebird_Loader_Test1") 
\s* \z/imsx,
+                'view definition';
+
             # test the fixed up ->_dbh_type_info_type_name for the ODBC driver
             if ($schema->storage->_dbi_connect_info->[0] =~ /:ODBC:/i) {
                 my %truncated_types = (
@@ -207,16 +223,4 @@
     $tester->run_tests();
 }
 
-sub cleanup_extra {
-    $schema->storage->disconnect;
-    my $dbh = $schema->storage->dbh;
-
-    foreach my $stmt (
-        'DROP TRIGGER "Firebird_Loader_Test1_BI"',
-        'DROP GENERATOR "Gen_Firebird_Loader_Test1_Id"',
-        'DROP TABLE "Firebird_Loader_Test1"',
-    ) {
-        eval { $dbh->do($stmt) };
-    }
-}
 # vim:et sts=4 sw=4 tw=0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/40overwrite_modifications.t 
new/DBIx-Class-Schema-Loader-0.07046/t/40overwrite_modifications.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/40overwrite_modifications.t  
2015-06-25 12:49:53.000000000 +0200
+++ new/DBIx-Class-Schema-Loader-0.07046/t/40overwrite_modifications.t  
2016-06-27 13:54:40.000000000 +0200
@@ -22,16 +22,7 @@
 ok( -f $foopm, 'looks like it dumped' );
 
 # now modify one of the files
-{
-    open my $in, '<', $foopm or die "$! reading $foopm";
-    my ($tfh,$temp) = tempfile( UNLINK => 1);
-    while(<$in>) {
-        s/"bars"/"somethingelse"/;
-        print $tfh $_;
-    }
-    close $tfh;
-    copy( $temp, $foopm );
-}
+rewrite_file($foopm, qr{"bars"}, q{"somethingelse"});
 
 # and dump again without overwrites
 throws_ok {
@@ -43,8 +34,37 @@
     dump_schema( overwrite_modifications => 1 );
 } 'does not throw when dumping with overwrite_modifications';
 
+# Replace the md5 with a bad MD5 in Foo.pm
+my $foopm_content = slurp_file($foopm);
+my ($md5) = $foopm_content =~/md5sum:(.+)$/m;
+# This cannot be just any arbitrary value, it has to actually look like an MD5
+# value or DBICSL doesn't even see it as an MD5 at all (which makes sense).
+my $bad_md5 = reverse $md5;
+rewrite_file($foopm, qr{md5sum:.+$}, "md5sum:$bad_md5");
+
+# and dump again without overwrites
+throws_ok {
+    dump_schema();
+} qr/mismatch/, 'throws error dumping without overwrite_modifications';
 
-unlike slurp_file $foopm, qr/"somethingelse"/, "Modifications actually 
overwritten";
+$foopm_content = slurp_file($foopm);
+like(
+    $foopm_content,
+    qr/\Q$bad_md5/,
+    'bad MD5 is not rewritten when overwrite_modifications is false'
+);
+
+# and then dump with overwrite
+lives_ok {
+    dump_schema( overwrite_modifications => 1 );
+} 'does not throw when dumping with overwrite_modifications';
+
+$foopm_content = slurp_file($foopm);
+unlike(
+    $foopm_content,
+    qr/\Q$bad_md5/,
+    'bad MD5 is rewritten when overwrite_modifications is true'
+);
 
 sub dump_schema {
 
@@ -56,11 +76,26 @@
     my $args = \@_;
 
     warnings_exist {
-        DBIx::Class::Schema::Loader::make_schema_at( 
'DBICTest::Schema::Overwrite_modifications',
+        DBIx::Class::Schema::Loader::make_schema_at(
+            'DBICTest::Schema::Overwrite_modifications',
             { dump_directory => $tempdir, @$args },
             [ $make_dbictest_db::dsn ],
         );
-    } [qr/^Dumping manual schema/, qr/^Schema dump completed/ ];
+    } [qr/^Dumping manual schema/, qr/^Schema dump completed/ ],
+    'schema was dumped with expected warnings';
+}
+
+sub rewrite_file {
+    my ($file, $match, $replace) = @_;
+
+    open my $in, '<', $file or die "$! reading $file";
+    my ($tfh, $temp) = tempfile( UNLINK => 1 );
+    while(<$in>) {
+        s/$match/$replace/;
+        print $tfh $_;
+    }
+    close $tfh;
+    copy( $temp, $file );
 }
 
 done_testing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/46relationships_multi_m2m.t 
new/DBIx-Class-Schema-Loader-0.07046/t/46relationships_multi_m2m.t
--- old/DBIx-Class-Schema-Loader-0.07045/t/46relationships_multi_m2m.t  
2015-03-05 15:39:08.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/t/46relationships_multi_m2m.t  
2016-06-27 13:54:40.000000000 +0200
@@ -3,7 +3,6 @@
 use Test::More;
 use lib qw(t/lib);
 use make_dbictest_db_multi_m2m;
-use Devel::Dwarn;
 
 use DBIx::Class::Schema::Loader;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DBIx-Class-Schema-Loader-0.07045/t/lib/dbixcsl_common_tests.pm 
new/DBIx-Class-Schema-Loader-0.07046/t/lib/dbixcsl_common_tests.pm
--- old/DBIx-Class-Schema-Loader-0.07045/t/lib/dbixcsl_common_tests.pm  
2015-11-11 15:25:18.000000000 +0100
+++ new/DBIx-Class-Schema-Loader-0.07046/t/lib/dbixcsl_common_tests.pm  
2016-02-18 21:10:34.000000000 +0100
@@ -168,6 +168,7 @@
             }
         }
 
+        $dbh->disconnect;
         $self->{_created} = 1;
 
         my $file_count = grep $_ =~ SOURCE_DDL, @{ $self->{extra}{create} || 
[] };
@@ -188,6 +189,7 @@
             $self->drop_extra_tables_only;
             rmtree DUMP_DIR;
         }
+        $conn->storage->disconnect;
     }
 }
 


Reply via email to