Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varchar to boolean mapping. #2305

Open
abhitiwari1322 opened this issue Jul 21, 2022 · 1 comment
Open

varchar to boolean mapping. #2305

abhitiwari1322 opened this issue Jul 21, 2022 · 1 comment

Comments

@abhitiwari1322
Copy link

abhitiwari1322 commented Jul 21, 2022

I have an existing application with Postgres, where boolean values are considered as TRUE/FALSE. I want to migrate it to Oracle.
Queries like Model.where(attribute: TRUE) are failing because oracle supports either 0/1 OR Y/N.

I consider changing in driver so that queries with true/false behave the same as 0/1 or Y/N.

Expected behavior

Model.where(attribute: TRUE)
It should return data.

Actual behavior

Model.where(attribute: TRUE)
ActiveRecord::StatementInvalid:
OCIError: ORA-00904: "TRUE": invalid identifier:

Rails version: 5.2

@akostadinov
Copy link
Contributor

Why not use a different column type on Oracle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants