Skip to content

Commit

Permalink
Unique is expected to be a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Sep 27, 2023
1 parent 3777248 commit 470ce8b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def indexes(table_name)
data.reduce([]) do |indexes, index|
index = index.with_indifferent_access

if index[:index_description] =~ /primary key/
if index[:index_description].match?(/primary key/)
indexes
else
name = index[:index_name]
unique = index[:index_description] =~ /unique/
unique = index[:index_description].match?(/unique/)
where = select_value("SELECT [filter_definition] FROM sys.indexes WHERE name = #{quote(name)}", "SCHEMA")
orders = {}
columns = []
Expand Down

0 comments on commit 470ce8b

Please sign in to comment.