Commit f99f59236b594a7ce10894c97821b1d60364086d

Authored by Evandro Jr
2 parents 6736c36d fb38345f

Merge branch 'fix_migration' into 'stable'

Fix migration

See merge request !6
db/migrate/20150408231524_add_settings_to_comments.rb
1 class AddSettingsToComments < ActiveRecord::Migration 1 class AddSettingsToComments < ActiveRecord::Migration
2 - def change  
3 - rename_column :comments, :setting, :settings 2 + def self.up
  3 + add_column :comments, :setting, :text unless column_exists?(:comments, :setting)
  4 + end
  5 +
  6 + def self.down
  7 + remove_column :comments, :setting
4 end 8 end
5 end 9 end