Sha256: 758cc316b981f4e3800392eee1b94ac323d88e81f37033ae15039b6874808d68

Contents?: true

Size: 1.34 KB

Versions: 44

Compression:

Stored size: 1.34 KB

Contents

class RenameModuleIndices < ActiveRecord::Migration
  def change
    # This migration will only need to be run if the indices were originally
    # generated before Rails 4. Fresh builds can safely skip this.
    return if ActiveRecord::Base.connection.indexes(:module_actions).first.name != 'index_module_actions_on_module_detail_id'

    rename_index :module_actions,
                 'index_module_actions_on_module_detail_id',
                 'index_module_actions_on_detail_id'
    rename_index :module_archs,
                 'index_module_archs_on_module_detail_id',
                 'index_module_archs_on_detail_id'
    rename_index :module_authors,
                 'index_module_authors_on_module_detail_id',
                 'index_module_authors_on_detail_id'
    rename_index :module_mixins,
                 'index_module_mixins_on_module_detail_id',
                 'index_module_mixins_on_detail_id'
    rename_index :module_platforms,
                 'index_module_platforms_on_module_detail_id',
                 'index_module_platforms_on_detail_id'
    rename_index :module_refs,
                 'index_module_refs_on_module_detail_id',
                 'index_module_refs_on_detail_id'
    rename_index :module_targets,
                 'index_module_targets_on_module_detail_id',
                 'index_module_targets_on_detail_id'
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
metasploit_data_models-3.0.10 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.9 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.8 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.7 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.6 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.5 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.17 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.4 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.2 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.1 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-3.0.0 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.16 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.15 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.14 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.13 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.12 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.11 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.10 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.9 db/migrate/20150317145455_rename_module_indices.rb
metasploit_data_models-2.0.8 db/migrate/20150317145455_rename_module_indices.rb