Sha256: bcf2589bdd84769a7a7b7551126244d64666d5f2b49983aea41712982a4ff85c

Contents?: true

Size: 339 Bytes

Versions: 33

Compression:

Stored size: 339 Bytes

Contents

class AddVhashInNode < ActiveRecord::Migration
  def self.up
    add_column :nodes, :vhash, :text
    Site.all.each do |site|
      puts "===== rebuilding vhash for #{site.host} (#{Node.count(:conditions => "site_id = #{site.id}")} nodes)"
      site.rebuild_vhash
    end
  end

  def self.down
    remove_column :nodes, :vhash
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
zena-1.2.8 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.7 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.6 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.5 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.4 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.3 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.2 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.1 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.2.0 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.1.3 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.1.2 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.1.1 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.1.0 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.0.0 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.0.0.rc3 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.0.0.rc2 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-1.0.0.rc1 db/fix/old_migrations/20091009084057_add_vhash_in_node.rb
zena-0.16.9 db/migrate/20091009084057_add_vhash_in_node.rb
zena-1.0.0.beta3 db/migrate/20091009084057_add_vhash_in_node.rb
zena-0.16.8 db/migrate/20091009084057_add_vhash_in_node.rb