;]
[askyou.git] / db / migrate / 20091225164732_remove_enumerations_opt.rb
blob72c39e05b5f95e343146a71680981fa3016c3cad
1 class RemoveEnumerationsOpt < ActiveRecord::Migration
2   def self.up
3     remove_column :enumerations, :opt
4   end
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