Sha256: a74ebd4ed0b3d1bedbc91d9fac747fb058d57ac04ea062a42ab8da7160b62a88

Contents?: true

Size: 460 Bytes

Versions: 34

Compression:

Stored size: 460 Bytes

Contents

class RemoveEnumerationsOpt < ActiveRecord::Migration
  def self.up
    remove_column :enumerations, :opt
  end

  def self.down
    add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
    Enumeration.where("type = 'IssuePriority'").update_all("opt = 'IPRI'")
    Enumeration.where("type = 'DocumentCategory'").update_all("opt = 'DCAT'")
    Enumeration.where("type = 'TimeEntryActivity'").update_all("opt = 'ACTI'")
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
redmine_extensions-0.0.23 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.22 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.21 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.20 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.19 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.18 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.17 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.16 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.15 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.14 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.13 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.12 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.10 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb
redmine_extensions-0.0.8 spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb