Sha256: 835e65af886d634174a7e294dd75e0fd7596908c443256e51d519a3c7e3fe3b0

Contents?: true

Size: 729 Bytes

Versions: 149

Compression:

Stored size: 729 Bytes

Contents

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

  NEW_COLUMN_NAME= :detail_id
  OLD_COLUMN_NAME = :module_detail_id
  TABLE_NAME = :module_authors

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

  # Rename `module_authors.module_detail_id` to `module_authors.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-3.0.10 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.9 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.8 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.7 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.6 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.5 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.17 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.4 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.2 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.1 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-3.0.0 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.16 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.15 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.14 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.13 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.12 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.11 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.10 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.9 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb
metasploit_data_models-2.0.8 db/migrate/20130412173121_change_foreign_key_in_module_authors.rb