From: Luke Saunders Date: Tue, 5 Feb 2008 15:23:51 +0000 (+0000) Subject: fixed versioning stuff to work with new namespace magic X-Git-Tag: v1.001002~41 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cec811b1a4a2ed76a7baf79437ee8bcb2b08cf2e;p=dbsrgits%2FDBIx-Class-Fixtures.git fixed versioning stuff to work with new namespace magic --- diff --git a/lib/DBIx/Class/Fixtures/SchemaVersioned.pm b/lib/DBIx/Class/Fixtures/SchemaVersioned.pm index f05d110..04edfd9 100644 --- a/lib/DBIx/Class/Fixtures/SchemaVersioned.pm +++ b/lib/DBIx/Class/Fixtures/SchemaVersioned.pm @@ -12,4 +12,7 @@ __PACKAGE__->loader_options( # debug => 1, ); +sub schema_version { + return $DBIx::Class::Fixtures::SchemaVersioned::VERSION; +} 1; diff --git a/lib/DBIx/Class/Fixtures/Versioned.pm b/lib/DBIx/Class/Fixtures/Versioned.pm index 48f29f4..cdf02d2 100644 --- a/lib/DBIx/Class/Fixtures/Versioned.pm +++ b/lib/DBIx/Class/Fixtures/Versioned.pm @@ -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; }