Method: CreatePosts#change
- Defined in:
- lib/railsbricks/assets/migrations/20141010133702_create_posts.rb
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/railsbricks/assets/migrations/20141010133702_create_posts.rb', line 2 def change create_table :posts do |t| t.string :title t.text :content_md t.text :content_html t.boolean :draft, default: false t.integer :user_id # FriendlyId t.string :slug t. end add_index :posts, :user_id end |