From 4c93783287808938873b3ac55cb0f1a98b2f80c6 Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Mon, 20 Apr 2015 17:50:57 -0300 Subject: [PATCH] fix migration --- db/migrate/20150408231524_add_settings_to_comments.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/db/migrate/20150408231524_add_settings_to_comments.rb b/db/migrate/20150408231524_add_settings_to_comments.rb index 9342ec0..1e44e1f 100644 --- a/db/migrate/20150408231524_add_settings_to_comments.rb +++ b/db/migrate/20150408231524_add_settings_to_comments.rb @@ -1,5 +1,9 @@ class AddSettingsToComments < ActiveRecord::Migration - def change - rename_column :comments, :setting, :settings + def self.up + add_column :comments, :setting, :text unless column_exists?(:comments, :setting) + end + + def self.down + remove_column :comments, :setting end end -- libgit2 0.21.2