Commit f99f59236b594a7ce10894c97821b1d60364086d
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'fix_migration' into 'stable'
Fix migration See merge request !6
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
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 |