-
-
Save anonymous/541fd4d47c13b584284b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
helper pg => sub { state $pg = Mojo::Pg->new('postgresql://postgres@/test') }; | |
app->pg->migrations->from_this_class->ensure_latest; | |
app->start; | |
__DATA__ | |
@@ migrations | |
-- 1 up | |
create table foo (bar varchar(255)); | |
-- 1 down | |
drop table foo; | |
-- 2 up | |
create table baz (yada varchar(255)); | |
-- 2 down | |
drop table baz; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment