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 465B

123456789101112
  1. class RemoveEnumerationsOpt < ActiveRecord::Migration[4.2]
  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.where("type = 'IssuePriority'").update_all("opt = 'IPRI'")
  8. Enumeration.where("type = 'DocumentCategory'").update_all("opt = 'DCAT'")
  9. Enumeration.where("type = 'TimeEntryActivity'").update_all("opt = 'ACTI'")
  10. end
  11. end