=head1 SYNOPSIS
- package My::Schema;
+ package MyApp::Schema;
use base qw/DBIx::Class::Schema/;
our $VERSION = 0.001;
- # load My::Schema::CD, My::Schema::Book, My::Schema::DVD
+ # load MyApp::Schema::CD, MyApp::Schema::Book, MyApp::Schema::DVD
__PACKAGE__->load_classes(qw/CD Book DVD/);
__PACKAGE__->load_components(qw/Schema::Versioned/);
# here to be sure.
# XXX - just fix it
$self->storage->sqlt_type;
-
+
my $upgrade_file = $self->ddl_filename(
$self->storage->sqlt_type,
$self->schema_version,
return;
}
- eval 'require SQL::Translator "0.09003"';
- if ($@) {
- $self->throw_exception("SQL::Translator 0.09003 required");
- }
+ $self->throw_exception($self->storage->_sqlt_version_error)
+ if (not $self->storage->_sqlt_version_ok);
- my $db_tr = SQL::Translator->new({
- add_drop_table => 1,
+ my $db_tr = SQL::Translator->new({
+ add_drop_table => 1,
parser => 'DBI',
parser_args => { dbh => $self->storage->dbh }
});