Skip to content

Commit 644b51e

Browse files
committed
Revert
1 parent c3968ba commit 644b51e

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,4 @@
99
- [#1153](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1153) Only support Ruby v3.1+
1010
- [#1196](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1196) Use default inspect for database adapter
1111

12-
#### Fixed
13-
14-
- [#](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/) Enable identity insert on view's base table
15-
1612
Please check [7-1-stable](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/7-1-stable/CHANGELOG.md) for previous changes.

lib/active_record/connection_adapters/sqlserver/database_statements.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ def internal_exec_query(sql, name = "SQL", binds = [], prepare: false, async: fa
4242
log(sql, name, binds, async: async) do |notification_payload|
4343
with_raw_connection do |conn|
4444
result = if id_insert_table_name = query_requires_identity_insert?(sql)
45-
# If the table name is a view, we need to get the base table name for enabling identity insert.
46-
id_insert_table_name = view_table_name(id_insert_table_name) if view_exists?(id_insert_table_name)
47-
4845
with_identity_insert_enabled(id_insert_table_name, conn) do
4946
internal_exec_sql_query(sql, conn)
5047
end

test/cases/view_test_sqlserver.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,4 @@ class ViewTestSQLServer < ActiveRecord::TestCase
4747
assert_equal 1, klass.count
4848
end
4949
end
50-
51-
describe 'identity insert' do
52-
it "identity insert works with views" do
53-
assert_difference("SSTestCustomersView.count", 1) do
54-
SSTestCustomersView.create!(id: 5, name: "Bob")
55-
end
56-
end
57-
end
5850
end

0 commit comments

Comments
 (0)