Sha256: 7ce8bc0f390ec1921fbe42840b64ecaf7c627453de351b0b462bb79a9c1d8e07

Contents?: true

Size: 458 Bytes

Versions: 20

Compression:

Stored size: 458 Bytes

Contents

# -*- encoding : utf-8 -*-

class UpdateCodenames < ActiveRecord::Migration[4.2]
  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

20 entries across 20 versions & 1 rubygems

Version Path
card-1.105.6 db/migrate/20130411210957_update_codenames.rb
card-1.105.5 db/migrate/20130411210957_update_codenames.rb
card-1.105.4 db/migrate/20130411210957_update_codenames.rb
card-1.105.3 db/migrate/20130411210957_update_codenames.rb
card-1.105.2.pre1 db/migrate/20130411210957_update_codenames.rb
card-1.105.2 db/migrate/20130411210957_update_codenames.rb
card-1.105.1 db/migrate/20130411210957_update_codenames.rb
card-1.105.0 db/migrate/20130411210957_update_codenames.rb
card-1.104.2 db/migrate/20130411210957_update_codenames.rb
card-1.104.1 db/migrate/20130411210957_update_codenames.rb
card-1.104.0 db/migrate/20130411210957_update_codenames.rb
card-1.103.4 db/migrate/20130411210957_update_codenames.rb
card-1.103.3 db/migrate/20130411210957_update_codenames.rb
card-1.103.2 db/migrate/20130411210957_update_codenames.rb
card-1.103.1 db/migrate/20130411210957_update_codenames.rb
card-1.103.0 db/migrate/20130411210957_update_codenames.rb
card-1.101.7 db/migrate/20130411210957_update_codenames.rb
card-1.102.0 db/migrate/20130411210957_update_codenames.rb
card-1.101.6 db/migrate/20130411210957_update_codenames.rb
card-1.101.5 db/migrate/20130411210957_update_codenames.rb