aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-01 16:01:53 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-01 16:01:53 +0000
commit631181ca18d2a21c3e72039b0c7f6c5a0b2fc05a (patch)
tree616eff996cee75f95695580660e31291038dca0d /railties
parent7056fc6782cba6dacccbba86cb231b58d8f5b4c8 (diff)
downloadrails-631181ca18d2a21c3e72039b0c7f6c5a0b2fc05a.tar.gz
rails-631181ca18d2a21c3e72039b0c7f6c5a0b2fc05a.tar.bz2
rails-631181ca18d2a21c3e72039b0c7f6c5a0b2fc05a.zip
Renamed the "oci" adapter to "oracle", but kept the old name as an alias (closes #4017) [schoenm@earthlink.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/configs/databases/oracle.yml30
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb4
2 files changed, 32 insertions, 2 deletions
diff --git a/railties/configs/databases/oracle.yml b/railties/configs/databases/oracle.yml
new file mode 100644
index 0000000000..3c3c8f8b13
--- /dev/null
+++ b/railties/configs/databases/oracle.yml
@@ -0,0 +1,30 @@
+# Oracle/OCI 8i, 9, 10g
+#
+# Requires Ruby/OCI8:
+# http://rubyforge.org/projects/ruby-oci8/
+#
+# Specify your database using any valid connection syntax, such as a
+# tnsnames.ora service name, or a sql connect url string of the form:
+#
+# //host:[port][/service name]
+
+development:
+ adapter: oracle
+ database: <%= app_name %>_development
+ username: <%= app_name %>
+ password:
+
+# Warning: The database defined as 'test' will be erased and
+# re-generated from your development database when you run 'rake'.
+# Do not set this db to the same as development or production.
+test:
+ adapter: oracle
+ database: <%= app_name %>_test
+ username: <%= app_name %>
+ password:
+
+production:
+ adapter: oracle
+ database: <%= app_name %>_production
+ username: <%= app_name %>
+ password:
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
index 80b2e3440a..1dc903a6c8 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -4,7 +4,7 @@ class AppGenerator < Rails::Generator::Base
DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
Config::CONFIG['ruby_install_name'])
- DATABASES = %w( mysql sqlite2 sqlite3 postgresql )
+ DATABASES = %w( mysql oracle postgresql sqlite2 sqlite3 )
default_options :db => "mysql", :shebang => DEFAULT_SHEBANG
mandatory_options :source => "#{File.dirname(__FILE__)}/../../../../.."
@@ -97,7 +97,7 @@ class AppGenerator < Rails::Generator::Base
"Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| }
opt.on("-d", "--database=name", String,
- "Preconfigure for selected database (options: mysql/postgresql/sqlite2/sqlite3).",
+ "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).",
"Default: mysql") { |options[:db]| }
end