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.91 db/migrate/20130411210957_update_codenames.rb
card-1.21.0 db/migrate/20130411210957_update_codenames.rb
card-1.20.4 db/migrate/20130411210957_update_codenames.rb
card-1.20.3 db/migrate/20130411210957_update_codenames.rb
card-1.20.2 db/migrate/20130411210957_update_codenames.rb
card-1.20.1 db/migrate/20130411210957_update_codenames.rb
card-1.20.0 db/migrate/20130411210957_update_codenames.rb
card-1.19.6 db/migrate/20130411210957_update_codenames.rb
card-1.19.5 db/migrate/20130411210957_update_codenames.rb
card-1.19.4 db/migrate/20130411210957_update_codenames.rb
card-1.19.3 db/migrate/20130411210957_update_codenames.rb
card-1.19.2 db/migrate/20130411210957_update_codenames.rb
card-1.19.1 db/migrate/20130411210957_update_codenames.rb
card-1.19.0 db/migrate/20130411210957_update_codenames.rb
card-1.18.6 db/migrate/20130411210957_update_codenames.rb
card-1.18.5 db/migrate/20130411210957_update_codenames.rb
card-1.18.4 db/migrate/20130411210957_update_codenames.rb
card-1.18.3 db/migrate/20130411210957_update_codenames.rb
card-1.18.2 db/migrate/20130411210957_update_codenames.rb
card-1.18.1 db/migrate/20130411210957_update_codenames.rb