From 62b445a1239944beaa1b3dfbd6112b67b946673b Mon Sep 17 00:00:00 2001 From: Adrian Salceanu Date: Wed, 12 Oct 2022 19:21:38 +0200 Subject: [PATCH] Cross platform remove_index --- src/Migration.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Migration.jl b/src/Migration.jl index d917ccc..a79d80c 100644 --- a/src/Migration.jl +++ b/src/Migration.jl @@ -527,20 +527,21 @@ function remove_columns(table_name::Symbol, cols::Vector{Symbol}) end end +function remove_index! end -function remove_index!(table_name::Union{String,Symbol}, column_name::Union{String,Symbol}) - SearchLight.Migration.remove_index(table_name, SearchLight.index_name(table_name, column_name)) +function remove_index(table_name::Union{String,Symbol}, column_name::Union{String,Symbol}) + SearchLight.Migration.remove_index!(table_name, SearchLight.index_name(table_name, column_name)) end function remove_indexes(indexes::Vector{Pair{Symbol,Symbol}}) for i in indexes - remove_index!(i...) + remove_index(i...) end end function remove_indexes(table_name::Union{Symbol,String}, indexes::Vector{Symbol}) for i in indexes - remove_index!(table_name, i) + remove_index(table_name, i) end end const remove_indices = remove_indexes