[Bast-commits] r5369 - in DBIx-Class/0.08/branches/stopgap/t: . lib/DBICTest lib/DBICTest/Schema

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Thu Jan 29 09:39:36 GMT 2009


Author: ribasushi
Date: 2009-01-29 09:39:36 +0000 (Thu, 29 Jan 2009)
New Revision: 5369

Added:
   DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema/Dummy.pm
Modified:
   DBIx-Class/0.08/branches/stopgap/t/86sqlt.t
   DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema.pm
Log:
Switch away the hook test from real tables (breaks DBICTEST_SQLT_DEPLOY=1)

Modified: DBIx-Class/0.08/branches/stopgap/t/86sqlt.t
===================================================================
--- DBIx-Class/0.08/branches/stopgap/t/86sqlt.t	2009-01-29 09:14:31 UTC (rev 5368)
+++ DBIx-Class/0.08/branches/stopgap/t/86sqlt.t	2009-01-29 09:39:36 UTC (rev 5369)
@@ -234,7 +234,7 @@
 my $tschema = $translator->schema();
 # Test that the $schema->sqlt_deploy_hook was called okay and that it removed
 # the 'link' table
-ok( !defined($tschema->get_table('link')), "Link table was removed by hook");
+ok( !defined($tschema->get_table('dummy')), "Dummy table was removed by hook");
 
 # Test that nonexistent constraints are not found
 my $constraint = get_constraint('FOREIGN KEY', 'cd', ['title'], 'cd', ['year']);

Added: DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema/Dummy.pm
===================================================================
--- DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema/Dummy.pm	                        (rev 0)
+++ DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema/Dummy.pm	2009-01-29 09:39:36 UTC (rev 5369)
@@ -0,0 +1,23 @@
+package # hide from PAUSE
+    DBICTest::Schema::Dummy;
+
+use base 'DBIx::Class::Core';
+
+use strict;
+use warnings;
+
+__PACKAGE__->table('dummy');
+__PACKAGE__->add_columns(
+    'id' => {
+        data_type => 'integer',
+        is_auto_increment => 1
+    },
+    'gittery' => {
+        data_type => 'varchar',
+        size      => 100,
+        is_nullable => 1,
+    },
+);
+__PACKAGE__->set_primary_key('id');
+
+1;

Modified: DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema.pm	2009-01-29 09:14:31 UTC (rev 5368)
+++ DBIx-Class/0.08/branches/stopgap/t/lib/DBICTest/Schema.pm	2009-01-29 09:39:36 UTC (rev 5369)
@@ -33,6 +33,7 @@
     'ArtistSubclass',
     'Producer',
     'CD_to_Producer',
+    'Dummy',
   ),
   qw/SelfRefAlias TreeLike TwoKeyTreeLike Event EventTZ NoPrimaryKey/,
   qw/Collection CollectionObject TypedObject/,
@@ -43,7 +44,7 @@
 sub sqlt_deploy_hook {
   my ($self, $sqlt_schema) = @_;
 
-  $sqlt_schema->drop_table('link');
+  $sqlt_schema->drop_table('dummy');
 }
 
 1;




More information about the Bast-commits mailing list