Skip to content

Instantly share code, notes, and snippets.

@edzhelyov
Created June 7, 2011 12:54
Show Gist options
  • Save edzhelyov/1012178 to your computer and use it in GitHub Desktop.
Save edzhelyov/1012178 to your computer and use it in GitHub Desktop.
Sequel migration helpers
module Helper
def create_product(name)
create_table name do
primary_key :id
String :name, :null => false
end
end
end
Sequel.migration do
up do
create_product :laptops
end
down do
drop_table :laptops
end
end
# Error: NoMethodError: undefined method `create_product' for #<Sequel::Postgres::Database:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment