Skip to content

Commit 798f84d

Browse files
committed
Fixed schema reflection for identity columns using ODBC. Fixes #193.
1 parent 80c291b commit 798f84d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/active_record/connection_adapters/sqlserver/schema_statements.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def column_definitions(table_name)
235235
end
236236
ci[:null] = ci[:is_nullable].to_i == 1 ; ci.delete(:is_nullable)
237237
ci[:is_primary] = ci[:is_primary].to_i == 1
238+
ci[:is_identity] = ci[:is_identity].to_i == 1 unless [TrueClass, FalseClass].include?(ci[:is_identity].class)
238239
ci
239240
end
240241
end

0 commit comments

Comments
 (0)