view .svn/pristine/de/de51cd935016bca0f1c03605ababd2b79c17c4c9.svn-base @ 1539:22d57b0e0a77 live

OK, this script works now, but it should be using the API
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 21 May 2015 17:31:06 +0100
parents dffacf8a6908
children
line wrap: on
line source
class UpdateEnumerationsToSti < ActiveRecord::Migration
  def self.up
    Enumeration.where("opt = 'IPRI'").update_all("type = 'IssuePriority'")
    Enumeration.where("opt = 'DCAT'").update_all("type = 'DocumentCategory'")
    Enumeration.where("opt = 'ACTI'").update_all("type = 'TimeEntryActivity'")
  end

  def self.down
    # no-op
  end
end