Skip to content

Conversation

aidanharan
Copy link
Contributor

When changing columns set date-time columns to datetime(6) by default.

Fixes failing test:
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/6234806413/job/16922729893?pr=1088

Error:
CompatibilityTest7_0#test_datetime_sets_precision_6_on_change_table:
ActiveRecord::StatementInvalid: TinyTds::Error: Conversion failed when converting date and/or time from character string.
    activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:454:in `each'
    activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:454:in `handle_to_names_and_values_dblib'

@aidanharan aidanharan marked this pull request as ready for review September 19, 2023 13:43
@aidanharan aidanharan merged commit 081cb84 into 7-0-stable Sep 19, 2023
@aidanharan aidanharan deleted the fix-change-table-test branch September 19, 2023 13:43
lavika pushed a commit to lavika/activerecord-sqlserver-adapter that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant