We are currently migrating from Rails 4.2 to Rails 5.2 and ran into issues with some queries that compare dates and times. We use different databases for Rails 4.2 and Rails 5.2 with the date fields in the Rails 5.2 database already converted as the update guide suggests. The following code succeeds in Rails 4.2 with oracle_enhanced-adapter 1.6.9 but fails in Rails 5.2 with oracle_enhanced-adapter 5.2.6:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We are currently migrating from Rails 4.2 to Rails 5.2 and ran into issues with some queries that compare dates and times. We use different databases for Rails 4.2 and Rails 5.2 with the date fields in the Rails 5.2 database already converted as the update guide suggests. The following code succeeds in Rails 4.2 with oracle_enhanced-adapter 1.6.9 but fails in Rails 5.2 with oracle_enhanced-adapter 5.2.6:
On further inspection,
some_date
gets quoted withTO_TIMESTAMP
in Rails 4 and adapter version 1.6.9 but not in Rails 5.2 with adapter version 5.2.6:With Rails 4.2.11.1 and adapter version 1.6.9 the where clause gets converted to:
With Rails 5.2 and 5.2.6: