[Bast-commits] r8370 - in DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols: lib/SQL/Translator/Parser/DBIx t

abraxxa at dev.catalyst.perl.org abraxxa at dev.catalyst.perl.org
Tue Jan 19 11:38:45 GMT 2010


Author: abraxxa
Date: 2010-01-19 11:38:44 +0000 (Tue, 19 Jan 2010)
New Revision: 8370

Modified:
   DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/lib/SQL/Translator/Parser/DBIx/Class.pm
   DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/86sqlt.t
   DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/99dbic_sqlt_parser.t
Log:
fixed Authors section
added License section
fixed t/86sqlt.t tests


Modified: DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/lib/SQL/Translator/Parser/DBIx/Class.pm	2010-01-18 22:22:12 UTC (rev 8369)
+++ DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/lib/SQL/Translator/Parser/DBIx/Class.pm	2010-01-19 11:38:44 UTC (rev 8370)
@@ -440,10 +440,10 @@
 
 =head1 AUTHORS
 
-Jess Robinson
+See L<DBIx::Class/CONTRIBUTORS>.
 
-Matt S Trout
+=head1 LICENSE
 
-Ash Berlin
+You may distribute this code under the same terms as Perl itself.
 
-Alexander Hartmaier
+=cut

Modified: DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/86sqlt.t	2010-01-18 22:22:12 UTC (rev 8369)
+++ DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/86sqlt.t	2010-01-19 11:38:44 UTC (rev 8370)
@@ -269,6 +269,7 @@
       'name' => 'forceforeign_fk_artist', 'index_name' => 'forceforeign_idx_artist',
       'selftable' => 'forceforeign', 'foreigntable' => 'artist', 
       'selfcols'  => ['artist'], 'foreigncols' => ['artistid'], 
+      'noindex'  => 1,
       on_delete => '', on_update => '', deferrable => 1,
     },
   ],
@@ -464,21 +465,21 @@
   my ($expected, $got) = @_;
   my $desc = $expected->{display};
   is( $got->name, $expected->{name},
-      "name parameter correct for `$desc'" );
+      "name parameter correct for '$desc'" );
   is( $got->on_delete, $expected->{on_delete},
-      "on_delete parameter correct for `$desc'" );
+      "on_delete parameter correct for '$desc'" );
   is( $got->on_update, $expected->{on_update},
-      "on_update parameter correct for `$desc'" );
+      "on_update parameter correct for '$desc'" );
   is( $got->deferrable, $expected->{deferrable},
-      "is_deferrable parameter correct for `$desc'" );
+      "is_deferrable parameter correct for '$desc'" );
 
   my $index = get_index( $got->table, { fields => $expected->{selfcols} } );
 
   if ($expected->{noindex}) {
-      ok( !defined $index, "index doesn't for `$desc'" );
+      ok( !defined $index, "index doesn't for '$desc'" );
   } else {
-      ok( defined $index, "index exists for `$desc'" );
-      is( $index->name, $expected->{index_name}, "index has correct name for `$desc'" );
+      ok( defined $index, "index exists for '$desc'" );
+      is( $index->name, $expected->{index_name}, "index has correct name for '$desc'" );
   }
 }
 
@@ -486,7 +487,7 @@
   my ($expected, $got) = @_;
   my $desc = $expected->{display};
   is( $got->name, $expected->{name},
-      "name parameter correct for `$desc'" );
+      "name parameter correct for '$desc'" );
 }
 
 done_testing;

Modified: DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/99dbic_sqlt_parser.t
===================================================================
--- DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/99dbic_sqlt_parser.t	2010-01-18 22:22:12 UTC (rev 8369)
+++ DBIx-Class/0.08/branches/no_duplicate_indexes_for_pk_cols/t/99dbic_sqlt_parser.t	2010-01-19 11:38:44 UTC (rev 8370)
@@ -39,6 +39,7 @@
     'Artwork'       => -1,
     'ForceForeign'  => -1,
     'LinerNotes'    => -1,
+    'TwoKeys'       => -1, # TwoKeys has the index turned off on the rel def
 };
 
 { 
@@ -52,7 +53,6 @@
     my @indices = $table->get_indices;
 
     my $index_count = scalar(@indices);
-    $index_count++ if ($source_name eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def
     is($index_count, $fk_count, "correct number of indices for $source_name with no args");
     
     for my $index (@indices) {
@@ -74,7 +74,6 @@
     $fk_count += $idx_exceptions->{$source_name} || 0;
     my @indices = $table->get_indices;
     my $index_count = scalar(@indices);
-    $index_count++ if ($source_name eq 'TwoKeys'); # TwoKeys has the index turned off on the rel def
     is($index_count, $fk_count, "correct number of indices for $source_name with add_fk_index => 1");
   }
 }




More information about the Bast-commits mailing list