aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/app/templates/config/databases
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-06-23 19:10:42 +0200
committerJosé Valim <jose.valim@gmail.com>2009-06-23 19:10:42 +0200
commit4494a752c3c568c65fa899c54486153a1a5fa187 (patch)
tree60149451a075242bd36c5298ea9838d1d2d50f2f /railties/lib/generators/rails/app/templates/config/databases
parent75fbd7393606b9b026418229eb3eb38542753d43 (diff)
downloadrails-4494a752c3c568c65fa899c54486153a1a5fa187.tar.gz
rails-4494a752c3c568c65fa899c54486153a1a5fa187.tar.bz2
rails-4494a752c3c568c65fa899c54486153a1a5fa187.zip
Change current sstructure.
Diffstat (limited to 'railties/lib/generators/rails/app/templates/config/databases')
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/frontbase.yml28
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml62
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/mysql.yml60
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/oracle.yml39
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/postgresql.yml51
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/sqlite2.yml19
-rw-r--r--railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml22
7 files changed, 281 insertions, 0 deletions
diff --git a/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml b/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml
new file mode 100644
index 0000000000..c0c3588be1
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/frontbase.yml
@@ -0,0 +1,28 @@
+# FrontBase versions 4.x
+#
+# Get the bindings:
+# gem install ruby-frontbase
+
+development:
+ adapter: frontbase
+ host: localhost
+ 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: frontbase
+ host: localhost
+ database: <%= app_name %>_test
+ username: <%= app_name %>
+ password: ''
+
+production:
+ adapter: frontbase
+ host: localhost
+ database: <%= app_name %>_production
+ username: <%= app_name %>
+ password: ''
diff --git a/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml
new file mode 100644
index 0000000000..a9716ddb44
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml
@@ -0,0 +1,62 @@
+# IBM Dataservers
+#
+# Home Page
+# http://rubyforge.org/projects/rubyibm/
+#
+# To install the ibm_db gem:
+# On Linux:
+# Source the db2profile file and set the necessary environment variables:
+#
+# . /home/db2inst1/sqllib/db2profile
+# export IBM_DB_DIR=/opt/ibm/db2/V9.1
+# export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32
+#
+# Then issue the command: gem install ibm_db
+#
+# On Windows:
+# Issue the command: gem install ibm_db
+# If prompted, select the mswin32 option
+#
+# For more details on the installation refer to http://rubyforge.org/docman/view.php/2361/7682/IBM_DB_GEM.pdf
+#
+# For more details on the connection parameters below refer to:
+# http://rubyibm.rubyforge.org/docs/adapter/0.9.0/rdoc/classes/ActiveRecord/ConnectionAdapters/IBM_DBAdapter.html
+
+development:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_dev
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation
+
+test:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_tst
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation
+
+production:
+ adapter: ibm_db
+ username: db2inst1
+ password:
+ database: <%= app_name[0,4] %>_prd
+ #schema: db2inst1
+ #host: localhost
+ #port: 50000
+ #account: my_account
+ #app_user: my_app_user
+ #application: my_application
+ #workstation: my_workstation \ No newline at end of file
diff --git a/railties/lib/generators/rails/app/templates/config/databases/mysql.yml b/railties/lib/generators/rails/app/templates/config/databases/mysql.yml
new file mode 100644
index 0000000000..6bf2f7b1fd
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/mysql.yml
@@ -0,0 +1,60 @@
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
+# On Mac OS X:
+# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
+# On Mac OS X Leopard:
+# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
+# This sets the ARCHFLAGS environment variable to your native architecture
+# On Windows:
+# gem install mysql
+# Choose the win32 build.
+# Install MySQL and put its /bin directory on your path.
+#
+# And be sure to use new-style password hashing:
+# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+development:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_development
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
+
+# 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: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_test
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
+
+production:
+ adapter: mysql
+ encoding: utf8
+ reconnect: false
+ database: <%= app_name %>_production
+ pool: 5
+ username: root
+ password:
+<% if mysql_socket -%>
+ socket: <%= mysql_socket %>
+<% else -%>
+ host: localhost
+<% end -%>
diff --git a/railties/lib/generators/rails/app/templates/config/databases/oracle.yml b/railties/lib/generators/rails/app/templates/config/databases/oracle.yml
new file mode 100644
index 0000000000..a1883f6256
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/oracle.yml
@@ -0,0 +1,39 @@
+# 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]
+#
+# By default prefetch_rows (OCI_ATTR_PREFETCH_ROWS) is set to 100. And
+# until true bind variables are supported, cursor_sharing is set by default
+# to 'similar'. Both can be changed in the configation below; the defaults
+# are equivalent to specifying:
+#
+# prefetch_rows: 100
+# cursor_sharing: similar
+#
+
+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/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/generators/rails/app/templates/config/databases/postgresql.yml
new file mode 100644
index 0000000000..f600e054cf
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/postgresql.yml
@@ -0,0 +1,51 @@
+# PostgreSQL. Versions 7.4 and 8.x are supported.
+#
+# Install the ruby-postgres driver:
+# gem install ruby-postgres
+# On Mac OS X:
+# gem install ruby-postgres -- --include=/usr/local/pgsql
+# On Windows:
+# gem install ruby-postgres
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: <%= app_name %>_development
+ pool: 5
+ username: <%= app_name %>
+ password:
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # The server defaults to notice.
+ #min_messages: warning
+
+# 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: postgresql
+ encoding: unicode
+ database: <%= app_name %>_test
+ pool: 5
+ username: <%= app_name %>
+ password:
+
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: <%= app_name %>_production
+ pool: 5
+ username: <%= app_name %>
+ password:
diff --git a/railties/lib/generators/rails/app/templates/config/databases/sqlite2.yml b/railties/lib/generators/rails/app/templates/config/databases/sqlite2.yml
new file mode 100644
index 0000000000..46f01cb42c
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/sqlite2.yml
@@ -0,0 +1,19 @@
+# SQLite version 2.x
+# gem install sqlite-ruby
+development:
+ adapter: sqlite
+ database: db/development.sqlite2
+ pool: 5
+
+# 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: sqlite
+ database: db/test.sqlite2
+ pool: 5
+
+production:
+ adapter: sqlite
+ database: db/production.sqlite2
+ pool: 5
diff --git a/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml b/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml
new file mode 100644
index 0000000000..025d62a8d8
--- /dev/null
+++ b/railties/lib/generators/rails/app/templates/config/databases/sqlite3.yml
@@ -0,0 +1,22 @@
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# 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: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000