fixed versioning stuff to work with new namespace magic
Luke Saunders [Tue, 5 Feb 2008 15:23:51 +0000 (15:23 +0000)]
lib/DBIx/Class/Fixtures/SchemaVersioned.pm
lib/DBIx/Class/Fixtures/Versioned.pm

index f05d110..04edfd9 100644 (file)
@@ -12,4 +12,7 @@ __PACKAGE__->loader_options(
                             # debug                 => 1,
                            );
 
+sub schema_version {
+       return $DBIx::Class::Fixtures::SchemaVersioned::VERSION;
+}
 1;
index 48f29f4..cdf02d2 100644 (file)
@@ -33,7 +33,6 @@ sub populate {
   unless ($params->{version}) {
     return DBIx::Class::Exception->throw('You must pass a version to populate');
   }
-
   return $self->next::method(@_);
 }
 
@@ -45,11 +44,9 @@ sub _generate_schema {
   $DBIx::Class::Fixtures::SchemaVersioned::VERSION = $params->{version};
 
   my $schema = $self->next::method(@_);
-  $schema->schema_version($params->{version});
 
   # set the db version to the schema version
   $schema->upgrade(); # set version number
-
   return $schema;
 }