Sha256: 31b11175c9142db6ae74bdd2eb06b97712d2f5de04649a329b2c285547368cd3

Contents?: true

Size: 452 Bytes

Versions: 14

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

14 entries across 14 versions & 1 rubygems

Version Path
card-1.17.4 db/migrate/20130411210957_update_codenames.rb
card-1.17.3 db/migrate/20130411210957_update_codenames.rb
card-1.17.2 db/migrate/20130411210957_update_codenames.rb
card-1.17.1 db/migrate/20130411210957_update_codenames.rb
card-1.17.0 db/migrate/20130411210957_update_codenames.rb
card-1.16.15 db/migrate/20130411210957_update_codenames.rb
card-1.16.14 db/migrate/20130411210957_update_codenames.rb
card-1.16.13 db/migrate/20130411210957_update_codenames.rb
card-1.16.12 db/migrate/20130411210957_update_codenames.rb
card-1.16.11 db/migrate/20130411210957_update_codenames.rb
card-1.16.10 db/migrate/20130411210957_update_codenames.rb
card-1.16.9 db/migrate/20130411210957_update_codenames.rb
card-1.16.8 db/migrate/20130411210957_update_codenames.rb
card-1.16.7 db/migrate/20130411210957_update_codenames.rb