Skip to content

Instantly share code, notes, and snippets.

@bimmerlabs
Created June 6, 2017 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bimmerlabs/dcf86bfa57a7dd25858539ceaacd81d3 to your computer and use it in GitHub Desktop.
Save bimmerlabs/dcf86bfa57a7dd25858539ceaacd81d3 to your computer and use it in GitHub Desktop.
add a column using Mojo::PG::Migrations
sub add_column {
my ($self, $tablename) = @_;
$self->bimmerlabs->migrations->from_string(
"-- 2 up
alter table $tablename;
add column number bigint
-- 2 down
does something need to be here?"
)->migrate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment