comparison db/migrate/.svn/text-base/20091225164732_remove_enumerations_opt.rb.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:513646585e45
1 class RemoveEnumerationsOpt < ActiveRecord::Migration
2 def self.up
3 remove_column :enumerations, :opt
4 end
5
6 def self.down
7 add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
8 Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'")
9 Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'")
10 Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'")
11 end
12 end