提交 53692535 编写于 作者: A Andrew White 提交者: GitHub

Merge pull request #28257 from yahonda/app_generators_use_oracle_enhanced

Update `database.yml` when `rails new <new_app> -d oracle` specified
......@@ -280,7 +280,7 @@ def gem_for_database
case options[:database]
when "mysql" then ["mysql2", [">= 0.3.18", "< 0.5"]]
when "postgresql" then ["pg", ["~> 0.18"]]
when "oracle" then ["ruby-oci8", nil]
when "oracle" then ["activerecord-oracle_enhanced-adapter", nil]
when "frontbase" then ["ruby-frontbase", nil]
when "sqlserver" then ["activerecord-sqlserver-adapter", nil]
when "jdbcmysql" then ["activerecord-jdbcmysql-adapter", nil]
......@@ -296,7 +296,6 @@ def convert_database_option_for_jruby
case options[:database]
when "postgresql" then options[:database].replace "jdbcpostgresql"
when "mysql" then options[:database].replace "jdbcmysql"
when "oracle" then options[:database].replace "jdbc"
when "sqlite3" then options[:database].replace "jdbcsqlite3"
end
end
......
# Oracle/OCI 8i, 9, 10g
# Oracle/OCI 11g or higher recommended
#
# Requires Ruby/OCI8:
# https://github.com/kubo/ruby-oci8
......@@ -17,7 +17,7 @@
# cursor_sharing: similar
#
default: &default
adapter: oracle
adapter: oracle_enhanced
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: <%= app_name %>
password:
......@@ -45,7 +45,9 @@ test:
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="oracle://myuser:mypass@localhost/somedatabase"
# DATABASE_URL="oracle-enhanced://myuser:mypass@localhost/somedatabase"
#
# Note that the adapter name uses a dash instead of an underscore.
#
# You can use this database configuration with:
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册