Created
January 17, 2014 05:17
-
-
Save guinslym/8468754 to your computer and use it in GitHub Desktop.
In a migration I have this following: " t.integer :post_count" where can I found in the doc all the attribute that I can give to 'post_*' so that Rails will make the proper sql statement. I mean can I have a t.integer :post_avg ?
This file contains hidden or 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 CreateCategories < ActiveRecord::Migration | |
def change | |
create_table :categories do |t| | |
t.string :name, null: false | |
t.string :slug, null: false | |
t.integer :post_count, default: 0 | |
t.timestamps | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment