From 7c2f82c7fdf22fcd8b4c54404e237b3f7b4da8c5 Mon Sep 17 00:00:00 2001 From: Anton Argirov Date: Fri, 29 May 2015 19:46:55 +0600 Subject: [PATCH] #11: fixed migrations on Rails 3 --- .../20120908120613_fix_example_workflow.rb | 30 ------------------- .../20150526132244_create_example_workflow.rb | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 db/migrate/20120908120613_fix_example_workflow.rb diff --git a/db/migrate/20120908120613_fix_example_workflow.rb b/db/migrate/20120908120613_fix_example_workflow.rb deleted file mode 100644 index f757250..0000000 --- a/db/migrate/20120908120613_fix_example_workflow.rb +++ /dev/null @@ -1,30 +0,0 @@ -class FixExampleWorkflow < ActiveRecord::Migration - def self.up - if workflow = CustomWorkflow.find_by_name("Duration/Done Ratio/Status correlation") - workflow.before_save = < 'Duration/Done Ratio/Status correlation' + old = CustomWorkflow.where(:name => 'Duration/Done Ratio/Status correlation').first old.destroy if old CustomWorkflow.create!(:name => 'Duration/Done Ratio/Status correlation', :author => 'anton.argirov@gmail.com', :description => < <