[Dbix-class] DBIC::DeploymentHandler upgrade - non-integer version numbers

Anthony Gladdish anthony.gladdish at newcastle.ac.uk
Wed Mar 16 15:46:27 GMT 2011


Hi,

DBIC::DeploymentHandler doesn't upgrade my database if I use decimal version numbers in my schema library.

prepare_install()
prepare_upgrade()
prepare_downgrade()

... works fine and creates the relevant .sql files correctly. But the following upgrade() code gives error:

my $s = $schema = MySchema->connect(...);
my $dh = DBIx::Class::DeploymentHandler->new( {
        schema              => $s,
        script_directory    => "/some/dir/to/sql",
        databases           => [qw/ MySQL /],
        sql_translator_args => { add_drop_table => 0, },
});
$dh->upgrade;

Error:

"Attribute (to_version) does not pass the type constraint because: Validation failed for 'Int' with value 0.33 at ... 5.8.8/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm line 66."

It works fine if I use integer version numbers though.

I don't particularly want to have to go through my libraries and change version numbering system in order to use this.
Is this something that should work or a new feature that will be added at some point?
Have I missed the documentation that says it only works with integer version numbers?

Thanks,
Anthony



More information about the DBIx-Class mailing list