Class: AddApprovedToComments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddApprovedToComments
- Defined in:
- lib/generators/bumble/templates/migrations/add_approved_to_comments.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
9 10 11 12 13 14 |
# File 'lib/generators/bumble/templates/migrations/add_approved_to_comments.rb', line 9 def self.down remove_column :comments, :approved remove_column :comments, :user_ip remove_column :comments, :user_agent remove_column :comments, :referrer end |
.up ⇒ Object
2 3 4 5 6 7 |
# File 'lib/generators/bumble/templates/migrations/add_approved_to_comments.rb', line 2 def self.up add_column :comments, :approved, :boolean, :default => true add_column :comments, :user_ip, :string add_column :comments, :user_agent, :string add_column :comments, :referrer, :string end |