aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
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