Skip to content

Commit c620287

Browse files
committed
Support identity-key-column judgement on multiple schema environment.
1 parent dfc57d3 commit c620287

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
MASTER
33

4+
* Support Identity-key-column judgement on multiple schema environment [Ken Tachiya]
5+
46
* Add support for tinyint data types. In MySQL all these types would be boolean, however in
57
our adapter, they will use the full 1 => 255 Fixnum value as you would expect. [Ken Collins]
68

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ def column_definitions(table_name)
10521052
ELSE NULL
10531053
end as is_nullable,
10541054
CASE
1055-
WHEN COLUMNPROPERTY(OBJECT_ID(columns.TABLE_NAME), columns.COLUMN_NAME, 'IsIdentity') = 0 THEN NULL
1055+
WHEN COLUMNPROPERTY(OBJECT_ID(columns.TABLE_SCHEMA+'.'+columns.TABLE_NAME), columns.COLUMN_NAME, 'IsIdentity') = 0 THEN NULL
10561056
ELSE 1
10571057
END as is_identity
10581058
FROM #{db_name}INFORMATION_SCHEMA.COLUMNS columns

0 commit comments

Comments
 (0)