Sha256: ad1e0ccdc0dcd21e9dd4c52bc29997f5abeb43a3218936c8612824a3c21aec7e

Contents?: true

Size: 452 Bytes

Versions: 21

Compression:

Stored size: 452 Bytes

Contents

# -*- encoding : utf-8 -*-
class UpdateCodenames < ActiveRecord::Migration
  def up
    { content: :structure, edit_help: :help }.each do |oldname, newname|
      execute %(update cards set codename = "#{newname}" where codename = "#{oldname}";)
    end
  end

  def down
    { content: :structure, edit_help: :help }.each do |oldname, newname|
      execute %(update cards set codename = "#{oldname}" where codename = "#{newname}";)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
card-1.18.0 db/migrate/20130411210957_update_codenames.rb