Commit f99f59236b594a7ce10894c97821b1d60364086d
Exists in
staging
and in
4 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 |
-
mentioned in commit 50e88e2f66016724625f43c82f96e1a7658a3ac0