in reply to Mojo::Pg::Migrations can't work in windows

The documentation suggests you should use:

use Mojo::Pg; use Mojo::Pg::Migrations; my $dsn = 'postgresql://postgres:fengguang@localhost/postgres'; my $file = 'E:\QMDownload\Mojo-Pg-2.08\examples\blog\migrations\blog.s +ql'; my $migrations = Mojo::Pg::Migrations->new( pg => Mojo::Pg->new( $dsn +) ); $migrations = $migrations->from_file( $file )->migrate;
The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Mojo::Pg::Migrations can't work in windows
by Thai Heng (Beadle) on Aug 28, 2015 at 04:16 UTC

    Thanks!

    The true reason is there is table mojo_migrations and no table posts. The code have no differences.

      Glad you got it working. I could only guess, since you didn't post the error message :-)

      The way forward always starts with a minimal test.