ManageIQ / miq_bot

ManageIQ Bot
Apache License 2.0
15 stars 39 forks source link

DB Migration: Recommend adding an index when adding a foreign key #24

Open jrafanie opened 9 years ago

jrafanie commented 9 years ago

See: https://github.com/ManageIQ/manageiq/pull/1170

jrafanie commented 9 years ago
class DropMiqRegionFromDatabaseBackups < ActiveRecord::Migration
  def up
    remove_column :database_backups, :miq_region_id
  end

  def down
    add_column :database_backups, :miq_region_id, :bigint
    # ^ Very easy to forget to add the index
  end
end
miq-bot commented 4 years ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the traige process documentation.