Skip to content

Instantly share code, notes, and snippets.

@joaomilho
Created June 16, 2014 21:32
Show Gist options
  • Save joaomilho/122a6b5f89716d3449af to your computer and use it in GitHub Desktop.
Save joaomilho/122a6b5f89716d3449af to your computer and use it in GitHub Desktop.
%% Migration: pets
UpSQL = "
CREATE TABLE pets(
id serial unique,
name text not null,
species text not null
);
".
DownSQL = "DROP TABLE pets;".
{create_pets,
fun(up) –> boss_db:execute(UpSQL);
(down) –> boss_db:execute(DownSQL)
end}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment