use_namespaces upgrade is fully tested, need to implement downgrade
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / lib / dbixcsl_common_tests.pm
index f4af33d..1bec30b 100644 (file)
@@ -99,6 +99,7 @@ sub setup_schema {
         inflect_singular        => { fkid => 'fkid_singular' },
         moniker_map             => \&_monikerize,
         debug                   => $debug,
+        use_namespaces          => 0,
         dump_directory          => $DUMP_DIR,
     );
 
@@ -122,7 +123,8 @@ sub setup_schema {
 
        my $expected_count = 34;
 
-       $expected_count += @{ $self->{extra}{drop} || [] };
+       $expected_count += grep /CREATE (?:TABLE|VIEW)/i,
+           @{ $self->{extra}{create} || [] };
 
        $expected_count -= grep /CREATE TABLE/, @statements_inline_rels
            if $self->{no_inline_rels};
@@ -139,6 +141,10 @@ sub setup_schema {
 
        $warn_count++ for grep /^Bad table or view/, @loader_warnings;
 
+       my $vendor = $self->{vendor};
+       $warn_count++ for grep /${vendor}_\S+ has no primary key/,
+           @loader_warnings;
+
         if($self->{skip_rels}) {
             SKIP: {
                 is(scalar(@loader_warnings), $warn_count, "No loader warnings")