Created
May 2, 2012 15:54
-
-
Save GantMan/2577722 to your computer and use it in GitHub Desktop.
Iconoclast Labs Migration Blog Command Examples
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
class AddVerminToBuffet < ActiveRecord::Migration | |
def change | |
add_column :buffets, :vermin, :boolean, default: true | |
end | |
end |
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
$ rails g model buffet name price:decimal |
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
$ rails g migration AddVerminToBuffet vermin:boolean |
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
$ 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