Skip to content

Instantly share code, notes, and snippets.

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 GantMan/2577722 to your computer and use it in GitHub Desktop.
Save GantMan/2577722 to your computer and use it in GitHub Desktop.
Iconoclast Labs Migration Blog Command Examples
class AddVerminToBuffet < ActiveRecord::Migration
def change
add_column :buffets, :vermin, :boolean, default: true
end
end
$ rails g model buffet name price:decimal
$ rails g migration AddVerminToBuffet vermin:boolean
$ rails g model fat_person buffet:references name heart_attacks:integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment