rails-sqlserver / activerecord-sqlserver-adapter

SQL Server Adapter For Rails
MIT License
968 stars 558 forks source link

Fix composite primary key with different data type with triggers #1164

Closed vividmuimui closed 2 months ago

vividmuimui commented 2 months ago

This PR allows adapter.exclude_output_inserted_table_names to specify the type of each primary key when trigger is set and there are tables with composite primary keys.

adapter.exclude_output_inserted_table_names['my_composite_pk_table_name'] = { pk_col_one: "uniqueidentifier", pk_col_two: "int" }

Fix https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/1163

aidanharan commented 2 months ago

@vividmuimui Thanks for the PR!!!