Sha256: 24e80beef04760557f77a66832fc69f82bdc88c2a5cbec6196273fb34b71e3cc

Contents?: true

Size: 434 Bytes

Versions: 94

Compression:

Stored size: 434 Bytes

Contents

class AddLoginsCounterCacheToCores < ActiveRecord::Migration
  def self.up
    add_column :metasploit_credential_cores, :logins_count, :integer, :default => 0

    Metasploit::Credential::Core.reset_column_information
    Metasploit::Credential::Core.all.each do |c|
      Metasploit::Credential::Core.reset_counters c.id, :logins
    end
  end

  def self.down
    remove_column :metasploit_credential_cores, :logins_count
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
metasploit-credential-3.0.4 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-3.0.3 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-3.0.2 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-3.0.1 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-3.0.0 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.14 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.13 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.12 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.11 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.10 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.9 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.8 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.7 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.6 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.5 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.4 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.3 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.2 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.1 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb
metasploit-credential-2.0.0 db/migrate/20140520140817_add_logins_counter_cache_to_cores.rb