Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the DBIx-Migration CPAN distribution.

Report information
The Basics
Id: 107220
Status: new
Priority: 0/
Queue: DBIx-Migration

Owner: Nobody in particular
Requestors: sjenkin [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Postgres Incompatibility
Date: Mon, 21 Sep 2015 16:56:10 +0100
To: bug-DBIx-Migration [...]
From: Steven Jenkin <sjenkin [...]>
Download (untitled) / with headers
text/plain 1.1k
= Environment Info: * Distribution name and version: DBIx::Migration-0.0.7 * Perl version: 5.16.2 * Postgres version 9.4.1 * Operating System vendor and version: Linux 2.6.32-504.1.3.el6.x86_64 1 SMP DBIx::Migration always generates a "Database is at version 1 , couldn't migrate to 2” error when used against a Postgres database. This is due to the version being stored as a CHAR(64) and therefore being padded with spaces. This space-padded value is then string compared to the expected value and will never match. The following fix appears to correct this: diff --git a/lib/DBIx/ b/lib/DBIx/ index a4c602d..3f1b164 100644 --- a/lib/DBIx/ +++ b/lib/DBIx/ @@ -76,7 +76,7 @@ sub migrate { $self->_connect; $wanted = $self->_newest unless defined $wanted; my $version = $self->_version; - if ( defined $version && ( $wanted eq $version ) ) { + if ( defined $version && ( $wanted == $version ) ) { print "Database is already at version $wanted\n" if $self->debug; return 1; }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to