gitt/forum_monster

View on GitHub
lib/generators/forum_monster/templates/migrations/posts.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CreatePostsTable < ActiveRecord::Migration
  def self.up
    create_table :posts, :force => true do |t|
      t.text     :body
      t.integer  :forum_id
      t.integer  :topic_id
      t.integer  :user_id

      t.timestamps
    end
  end

  def self.down
    drop_table :posts
  end
end