1 package DBIx::Class::DeploymentHandler::VersionStorage::Standard::Component;
7 use DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult;
9 sub attach_version_storage {
10 $_[0]->register_class(
11 __VERSION => 'DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult'
17 $self->next::method(@_);
19 $self->attach_version_storage;
21 my $args = $_[3] || {};
23 unless ( $args->{ignore_version} || $ENV{DBIC_NO_VERSION_CHECK}) {
24 my $versions = $self->resultset('__VERSION');
26 if (!$versions->is_installed) {
27 carp "Your DB is currently unversioned. Please call upgrade on your schema to sync the DB.\n";
28 } elsif ($versions->db_version ne $self->schema_version) {
29 carp 'Versions out of sync. This is ' . $self->schema_version .
30 ', your database contains version ' . $versions->db_version . ", please call upgrade on your Schema.\n";