From fef4bf320c3cefcb762b9eb4eb7a6b55654a97ac Mon Sep 17 00:00:00 2001 From: Anton Argirov Date: Fri, 29 May 2015 19:55:46 +0600 Subject: [PATCH] #11: fixed migrations on Rails 2, 3 --- .../20120908120613_fix_example_workflow.rb | 30 ------------------- .../20150526132244_create_example_workflow.rb | 9 ++---- 2 files changed, 3 insertions(+), 36 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", :description => < < 'Duration/Done Ratio/Status correlation' + old = CustomWorkflow.find(:first, :conditions => ['name=?', 'Duration/Done Ratio/Status correlation']) old.destroy if old - CustomWorkflow.create!(:name => 'Duration/Done Ratio/Status correlation', :author => 'anton.argirov@gmail.com', :description => < <>>>>>> 75fa968... #8: fixed crash during migrations on new install:db/migrate/20150526132244_create_example_workflow.rb + CustomWorkflow.create!(:name => 'Duration/Done Ratio/Status correlation', :description => < <