-
Notifications
You must be signed in to change notification settings - Fork 566
Open
Labels
Description
I believe this is the culprit.
Line 482 in 0adea5b
id_column = identity_columns(raw_table_name).first |
When you leverage the capability of SQL Server to operate across databases the lookup for identity columns is broken because schema_cache is bound to a single connection pool.
Just to illustrate with an example the following can be added to line 84 of adapter_test_sqlserver.rb
sql = <<~SQL
INSERT INTO #{arunit2_database}.dbo.colleges SELECT * FROM #{arunit_database}.dbo.topics
SQL
assert arunit_connection.send(:query_requires_identity_insert?, sql)