Sha256: f2d3ddeadb5039c4a4d9e875b3173dfb0ef397386025358d235cc6447119b9d1

Contents?: true

Size: 302 Bytes

Versions: 30

Compression:

Stored size: 302 Bytes

Contents

class CorrectVclassKpath < ActiveRecord::Migration
  def self.up
    klasses = VirtualClass.find(:all)
    klasses.each do |vclass|
      Node.connection.execute "UPDATE nodes SET kpath = #{Node.connection.quote(vclass.kpath)} WHERE vclass_id = #{vclass[:id]}"
    end
  end

  def self.down
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
zena-0.16.6 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.5 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.4 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.3 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.2 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.1 db/migrate/024_correct_vclass_kpath.rb
zena-0.16.0 db/migrate/024_correct_vclass_kpath.rb
zena-0.15.2 db/migrate/024_correct_vclass_kpath.rb
zena-0.15.1 db/migrate/024_correct_vclass_kpath.rb
zena-0.15.0 db/migrate/024_correct_vclass_kpath.rb