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

Convert version numbers from Integer to String #1896

Closed
wants to merge 2 commits into from

Conversation

yahonda
Copy link
Collaborator

@yahonda yahonda commented Jun 19, 2019

This pull request fix #1893

rails/rails#36439 introduces the change below.

https://github.com/rails/rails/blob/aae270de9e0862f31b14642908472d235a17936f/activerecord/lib/active_record/schema_migration.rb#L47-L49

def all_versions
  order(:version).pluck(:version).map(&:to_i)
end

Here all_versions returns version numbers as an array of Integer, while Oracle enhanced adapter expects them as an array of String.

This pull request has a workaround commit to specify the commit has of Rails because Oracle enhanced adapter does not support rails/rails#35891 yet. This commit will be reverted later.

Refer rails/rails#36439

https://github.com/rails/rails/blob/aae270de9e0862f31b14642908472d235a17936f/activerecord/lib/active_record/schema_migration.rb#L47-L49

Here `all_versions` returns version numbers as an array of Integer,
while Oracle enhanced adapter expects them as an array of String.

```ruby
def all_versions
  order(:version).pluck(:version).map(&:to_i)
end
```

Fix rsim#1893
@yahonda yahonda requested a review from koic June 19, 2019 16:07
@yahonda
Copy link
Collaborator Author

yahonda commented Jun 19, 2019

@koic Would you review this pull request because this commit modifies #1084 you contributed.

yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Jun 20, 2019
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Jun 20, 2019
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Jun 20, 2019
@yahonda
Copy link
Collaborator Author

yahonda commented Jun 20, 2019

This pull request may be going to be unnecessary because of rails/rails#36525.

@yahonda
Copy link
Collaborator Author

yahonda commented Jun 21, 2019

Closing this pull request because it has been addressed by rails/rails#36525.

@yahonda yahonda closed this Jun 21, 2019
@yahonda yahonda deleted the diag_1893 branch July 13, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant