Commit 4c93783287808938873b3ac55cb0f1a98b2f80c6

Authored by Evandro Junior
1 parent dc0f987c

fix migration

db/migrate/20150408231524_add_settings_to_comments.rb
1 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 8 end
5 9 end
... ...