You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20091225164732_remove_enumerations_opt.rb 442B

123456789101112
  1. class RemoveEnumerationsOpt < ActiveRecord::Migration
  2. def self.up
  3. remove_column :enumerations, :opt
  4. end
  5. def self.down
  6. add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
  7. Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'")
  8. Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'")
  9. Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'")
  10. end
  11. end