Sha256: 8c91de9eaeb193b1777f480c9dcad457d0b2452b4f63f39a78938fc886fbdaf4

Contents?: true

Size: 437 Bytes

Versions: 15

Compression:

Stored size: 437 Bytes

Contents

class CreateIndexOnPrivateDataAndTypeForSshKey < ActiveRecord::Migration
  def up
    sql =<<ENDL
CREATE UNIQUE INDEX "index_metasploit_credential_privates_on_type_and_data_sshkey" ON
"metasploit_credential_privates" ("type", decode(md5(data), 'hex'))
WHERE type in ('Metasploit::Credential::SSHKey')
ENDL
    execute(sql)
  end
  def down
    execute("DROP INDEX index_metasploit_credential_privates_on_type_and_data_sshkey")
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
metasploit-credential-3.0.4 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-3.0.3 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-3.0.2 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-3.0.1 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-3.0.0 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.14 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.13 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.12 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.11 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.10 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.9 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.8 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.7 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.6 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb
metasploit-credential-2.0.5 db/migrate/20161107203710_create_index_on_private_data_and_type_for_ssh_key.rb