Last active
December 29, 2015 00:29
-
-
Save Tasha25/7586228 to your computer and use it in GitHub Desktop.
Active record when you have to add a column
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 generate migration AddIqToZombie iq:integer | |
You have to tell the ActiveRecord what they are doing Add | |
You have to tell them to what column to add Iq | |
You have to tell them to what table Zombie | |
You have to tell them the type of material that it will be, in this case iq will be an integer | |
Then do rake db:migrate and/or RAILS_ENV=test rake db:migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment