選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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