database_consistency
Advanced tools
@@ -19,3 +19,3 @@ # frozen_string_literal: true | ||
| def preconditions | ||
| !index.unique | ||
| !index.unique && Helper.btree_index?(index) | ||
| end | ||
@@ -52,3 +52,3 @@ | ||
| model.connection.indexes(model.table_name).find do |another_index| | ||
| next if index.name == another_index.name | ||
| next if index.name == another_index.name || !Helper.btree_index?(another_index) | ||
@@ -55,0 +55,0 @@ clause_equals?(another_index) && include_index_as_prefix?(another_index) |
@@ -115,2 +115,7 @@ # frozen_string_literal: true | ||
| def btree_index?(index) | ||
| (index.type.nil? || index.type.to_s == 'btree') && | ||
| (index.using.nil? || index.using.to_s == 'btree') | ||
| end | ||
| def extract_columns(str) | ||
@@ -117,0 +122,0 @@ str.scan(/(\w+)/).flatten |
| # frozen_string_literal: true | ||
| module DatabaseConsistency | ||
| VERSION = '2.0.6' | ||
| VERSION = '2.0.7' | ||
| end |