1 package DBIx::Class::Fixtures::Versioned;
6 use base qw/DBIx::Class::Fixtures/;
15 our $VERSION = '1.000';
37 $self->schema_class("DBIx::Class::Fixtures::SchemaVersioned");
38 unless ($params->{version}) {
39 return DBIx::Class::Exception->throw('You must pass a version to populate');
42 return $self->next::method(@_);
45 sub _generate_schema {
49 my $v = $self->schema_class;
50 # manually set the schema version
51 ${$v::VERSION} = $params->{version};
53 my $schema = $self->next::method(@_);
55 # set the db version to the schema version
56 $schema->upgrade(); # set version number