1. 23 4月, 2020 8 次提交
  2. 22 4月, 2020 6 次提交
  3. 21 4月, 2020 7 次提交
  4. 20 4月, 2020 6 次提交
  5. 19 4月, 2020 4 次提交
  6. 18 4月, 2020 2 次提交
  7. 17 4月, 2020 6 次提交
  8. 16 4月, 2020 1 次提交
    • E
      Add `if_exists` option to `remove_index` · 36ea1084
      eileencodes 提交于
      This PR allows for passing `if_exists` options to the `remove_index`
      method so that we can ignore already removed indexes. This work follows
      column `if/if_not_exists` from #38352 and `:if_not_exists` on `add_index`
      from #38555.
      
      We've found this useful at GitHub, there are migrations where we don't
      want to raise if an index was already removed. This will allow us to
      remove a monkey patch on `remove_index`.
      
      I considered raising after the `index_name_for_remove` method is called
      but that method will raise if the index doesn't exist before we get to
      execute. I have a commit that refactors this but after much
      consideration this change is cleaner and more straightforward than other
      ways of implementing this.
      
      This change also adds a little extra validation to the `add_index` test.
      Fix `nodoc` on edited methods.
      36ea1084