Sha256: 2d956da3d4c1f4bb84c8a661ef612f6301caf02f485238102c82ad7944aa0ccf

Contents?: true

Size: 713 Bytes

Versions: 149

Compression:

Stored size: 713 Bytes

Contents

# Changes `module_archs.module_detail_id` to `module_archs.detail_id` so that foreign key matches the conventional
# name when `Mdm::ModuleDetail` became {Mdm::Module::Detail}.
class ChangeForeignKeyInModuleArchs < ActiveRecord::Migration
  #
  # CONSTANTS
  #

  NEW_COLUMN_NAME= :detail_id
  OLD_COLUMN_NAME = :module_detail_id
  TABLE_NAME = :module_archs

  # Renames `module_archs.detail_id` to `module_archs.module_detail_id`.
  #
  # @return [void]
  def down
    rename_column TABLE_NAME, NEW_COLUMN_NAME, OLD_COLUMN_NAME
  end

  # Rename `module_archs.module_detail_id` to `module_archs.detail_id`
  #
  # @return [void]
  def up
    rename_column TABLE_NAME, OLD_COLUMN_NAME, NEW_COLUMN_NAME
  end
end

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
metasploit_data_models-2.0.7 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-2.0.6 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-2.0.5 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-2.0.4 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-2.0.1 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-2.0.0 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.3.0 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.11 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.10 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.9 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.8 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.7 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.6 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.5 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.4 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.3 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.2 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-0.24.5 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-0.24.4 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb
metasploit_data_models-1.2.1 db/migrate/20130412171844_change_foreign_key_in_module_archs.rb