Skip to content

Commit

Permalink
Merge pull request #42 from Sage/FOX-2594
Browse files Browse the repository at this point in the history
FOX-2594: Remove LIMIT clause for `index_exists?`
  • Loading branch information
alvarez-moreno-sergio authored Aug 18, 2023
2 parents 3eb56ab + d7da34c commit 0614eb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/mysql_framework/scripts/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def column_exists?(client, table_name, column_name)

def index_exists?(client, table_name, index_name)
result = client.query(<<~SQL)
SHOW INDEX FROM #{table_name} WHERE Key_name="#{index_name}" LIMIT 1;
SHOW INDEX FROM #{table_name} WHERE Key_name="#{index_name}";
SQL

result.count == 1
result.count >= 1
end

protected
Expand Down
2 changes: 1 addition & 1 deletion lib/mysql_framework/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MysqlFramework
VERSION = '2.1.4'
VERSION = '2.1.5'
end

0 comments on commit 0614eb0

Please sign in to comment.