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.sql'; my $migrations = Mojo::Pg::Migrations->new( pg => Mojo::Pg->new( $dsn ) ); $migrations = $migrations->from_file( $file )->migrate;