summaryrefslogtreecommitdiffstats
path: root/db/migrate/022_serialize_possibles_values.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-03 12:57:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-03 12:57:33 +0000
commit8316e786672d019699ea472bf83eda5da32820f9 (patch)
treeecb7c81760c83f9c24da7d82a6198a16da4b37b3 /db/migrate/022_serialize_possibles_values.rb
parent4a988b0f9223f76dee2252608986a6e3f1a634a6 (diff)
downloadredmine-8316e786672d019699ea472bf83eda5da32820f9.tar.gz
redmine-8316e786672d019699ea472bf83eda5da32820f9.zip
custom_field.possible_values is now serialized (no longer pipe separated)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@223 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/022_serialize_possibles_values.rb')
-rw-r--r--db/migrate/022_serialize_possibles_values.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/022_serialize_possibles_values.rb b/db/migrate/022_serialize_possibles_values.rb
new file mode 100644
index 000000000..5158f37fd
--- /dev/null
+++ b/db/migrate/022_serialize_possibles_values.rb
@@ -0,0 +1,13 @@
+class SerializePossiblesValues < ActiveRecord::Migration
+ def self.up
+ CustomField.find(:all).each do |field|
+ if field.possible_values and field.possible_values.is_a? String
+ field.possible_values = field.possible_values.split('|')
+ field.save
+ end
+ end
+ end
+
+ def self.down
+ end
+end