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

Update database.yml when rails new <new_app> -d oracle specified #28257

Merged
merged 1 commit into from
Mar 6, 2017

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Mar 2, 2017

Summary

This pull requests updates database.yml for Oracle enhanced adapter users.

  • Install "activerecord-oracle_enhanced-adapter".
    Oracle adapter used to be a bundled one. Now it is a 3rd party one.
    Also "ruby-oci8" is a required gem for CRuby, not for JRuby.

  • Remove oracle entry for JRuby since Oracle enhanced adapter
    supports both CRuby and JRuby with a single gem.

  • Change adapter name from oracle to oracle_enhanced in the oracle.yml.
    Not changing -d oracle

  • Update DATABASE_URL entry to use a dash instead of an underscore
    Refer d72a0cb for the reason.

  - Install "activerecord-oracle_enhanced-adapter".
  Oracle adapter used to be a bundled one. Now it is a 3rd party one.
  Also "ruby-oci8" is a required gem for CRuby, not for JRuby.

  - Remove oracle entry for JRuby since Oracle enhanced adapter
  supports both CRuby and JRuby with single gem.

  - Change adapter name from `oracle` to `oracle_enhanced` in the oracle.yml.
  Not changing `-d oracle`

  - Update `DATABASE_URL` entry to use a dash instead of an underscore
  Refer rails@d72a0cb
  for the reason.
Copy link
Member

@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pixeltrix pixeltrix merged commit 5369253 into rails:master Mar 6, 2017
@pixeltrix
Copy link
Contributor

@yahonda just out of interest, do you know where the latest version of the non-enhanced code is meant to be? We have a bunch of conditions in our test suite for :OracleAdapter and I'm wondering how relevant they still are.

@yahonda
Copy link
Member Author

yahonda commented Mar 6, 2017

Oracle enhanced adapter is a fork version of original Oracle adapter (OracleAdapter).
The original OracleAdapter has not been maintained anymore since at least when I started maintaining Oracle enhanced adapter in 2011.

Oracle enhanced adapter emulates OracleAdapter by setting emulate_oracle_adapter: true .
https://github.com/rsim/oracle-enhanced/blob/master/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb#L84-L89

emulate_oracle_adapter: true is set by default at ActiveRecord unit test connection configuration.
https://github.com/rails/rails/blob/master/activerecord/test/config.example.yml#L69

Then :OracleAdapter works.

@pixeltrix
Copy link
Contributor

@yahonda thanks for the clarification 👍

@yahonda yahonda deleted the app_generators_use_oracle_enhanced branch March 30, 2017 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants