Skip to content

Commit 7776108

Browse files
committed
Updated join to include VIEWs along with TABLEs for determining the IDENTITY column.
1 parent 1a5ce97 commit 7776108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver/schema_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def column_definitions(table_name)
191191
INNER JOIN #{db_name_with_period}.sys.objects AS o
192192
ON s.schema_id = o.schema_id
193193
AND o.is_ms_shipped = 0
194-
AND o.type = 'U'
194+
AND o.type IN ('U', 'V')
195195
AND o.name = columns.TABLE_NAME
196196
INNER JOIN #{db_name_with_period}.sys.columns AS c
197197
ON o.object_id = c.object_id

0 commit comments

Comments
 (0)