Class: CreateForumsTable
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateForumsTable
- Defined in:
- lib/generators/forum_monster/templates/migrations/forums.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/forum_monster/templates/migrations/forums.rb', line 16 def self.down drop_table :forums end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/forum_monster/templates/migrations/forums.rb', line 2 def self.up create_table :forums, :force => true do |t| t.string :title t.text :description t.boolean :state, :default => true t.integer :topics_count, :default => 0 t.integer :posts_count, :default => 0 t.integer :position, :default => 0 t.integer :category_id t. end end |