Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
8ed188ca
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8ed188ca
编写于
11月 08, 2013
作者:
X
Xavier Noria
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12292 from bf4/better_database_yaml
Extract common database defaults; better use of YAML
上级
587f15d1
124216ad
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
85 addition
and
145 deletion
+85
-145
railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
...rators/rails/app/templates/config/databases/frontbase.yml
+7
-10
railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
...enerators/rails/app/templates/config/databases/ibm_db.yml
+11
-31
railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
.../generators/rails/app/templates/config/databases/jdbc.yml
+6
-10
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml
...rators/rails/app/templates/config/databases/jdbcmysql.yml
+8
-10
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
...s/rails/app/templates/config/databases/jdbcpostgresql.yml
+8
-11
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
...tors/rails/app/templates/config/databases/jdbcsqlite3.yml
+6
-3
railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml
...generators/rails/app/templates/config/databases/mysql.yml
+8
-22
railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml
...enerators/rails/app/templates/config/databases/oracle.yml
+7
-9
railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml
...ators/rails/app/templates/config/databases/postgresql.yml
+9
-14
railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml
...nerators/rails/app/templates/config/databases/sqlite3.yml
+8
-8
railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml
...rators/rails/app/templates/config/databases/sqlserver.yml
+7
-17
未找到文件。
railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
浏览文件 @
8ed188ca
...
...
@@ -6,26 +6,23 @@
# Configure Using Gemfile
# gem 'ruby-frontbase'
#
de
velopment
:
de
fault
:
&default
adapter
:
frontbase
host
:
localhost
database
:
<%= app_name %>_development
username
:
<%= app_name %>
password
:
'
'
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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
<<
:
*default
database
:
<%= app_name %>_test
username
:
<%= app_name %>
password
:
'
'
production
:
adapter
:
frontbase
host
:
localhost
<<
:
*default
database
:
<%= app_name %>_production
username
:
<%= app_name %>
password
:
'
'
railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
浏览文件 @
8ed188ca
...
...
@@ -33,12 +33,11 @@
#
# For more details on the installation and the connection parameters below,
# please refer to the latest documents at http://rubyforge.org/docman/?group_id=2361
de
velopment
:
#
de
fault
:
&default
adapter
:
ibm_db
username
:
db2inst1
password
:
database
:
<%= app_name[0,4] %>_dev
#schema: db2inst1
#host: localhost
#port: 50000
...
...
@@ -51,36 +50,17 @@ development:
#authentication: SERVER
#parameterized: false
development
:
<<
:
*default
database
:
<%= app_name[0,4] %>_dev
# 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
:
ibm_db
username
:
db2inst1
password
:
<<
:
*default
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
#security: SSL
#timeout: 10
#authentication: SERVER
#parameterized: false
production
:
adapter
:
ibm_db
username
:
db2inst1
password
:
<<
:
*default
database
:
<%= app_name[0,8] %>
#schema: db2inst1
#host: localhost
#port: 50000
#account: my_account
#app_user: my_app_user
#application: my_application
#workstation: my_workstation
#security: SSL
#timeout: 10
#authentication: SERVER
#parameterized: false
\ No newline at end of file
railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
浏览文件 @
8ed188ca
...
...
@@ -36,27 +36,23 @@
# file). See your driver documentation for the apropriate driver class and
# connection string:
de
velopment
:
de
fault
:
&default
adapter
:
jdbc
username
:
<%= app_name %>
password
:
driver
:
development
:
<<
:
*default
url
:
jdbc:db://localhost/<%= app_name %>_development
# 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
:
jdbc
username
:
<%= app_name %>
password
:
driver
:
<<
:
*default
url
:
jdbc:db://localhost/<%= app_name %>_test
production
:
adapter
:
jdbc
username
:
<%= app_name %>
password
:
driver
:
<<
:
*default
url
:
jdbc:db://localhost/<%= app_name %>_production
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml
浏览文件 @
8ed188ca
...
...
@@ -8,26 +8,24 @@
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development
:
#
default
:
&default
adapter
:
mysql
database
:
<%= app_name %>_development
username
:
root
password
:
host
:
localhost
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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
<<
:
*default
database
:
<%= app_name %>_test
username
:
root
password
:
host
:
localhost
production
:
adapter
:
mysql
<<
:
*default
database
:
<%= app_name %>_production
username
:
root
password
:
host
:
localhost
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
浏览文件 @
8ed188ca
...
...
@@ -2,14 +2,17 @@
#
# Configure Using Gemfile
# gem 'activerecord-jdbcpostgresql-adapter'
de
velopment
:
#
de
fault
:
&default
adapter
:
postgresql
encoding
:
unicode
database
:
<%= app_name %>_development
username
:
<%= app_name %>
password
:
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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.
...
...
@@ -29,15 +32,9 @@ development:
# 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
<<
:
*default
database
:
<%= app_name %>_test
username
:
<%= app_name %>
password
:
production
:
adapter
:
postgresql
encoding
:
unicode
<<
:
*default
database
:
<%= app_name %>_production
username
:
<%= app_name %>
password
:
railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
浏览文件 @
8ed188ca
...
...
@@ -4,17 +4,20 @@
# Configure Using Gemfile
# gem 'activerecord-jdbcsqlite3-adapter'
#
de
velopment
:
de
fault
:
&default
adapter
:
sqlite3
development
:
<<
:
*default
database
:
db/development.sqlite3
# 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
<<
:
*default
database
:
db/test.sqlite3
production
:
adapter
:
sqlite3
<<
:
*default
database
:
db/production.sqlite3
railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml
浏览文件 @
8ed188ca
...
...
@@ -8,10 +8,10 @@
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development
:
#
default
:
&default
adapter
:
mysql2
encoding
:
utf8
database
:
<%= app_name %>_development
pool
:
5
username
:
root
password
:
...
...
@@ -21,31 +21,17 @@ development:
host
:
localhost
<% end -%>
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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
:
mysql2
encoding
:
utf8
<<
:
*default
database
:
<%= app_name %>_test
pool
:
5
username
:
root
password
:
<% if mysql_socket -%>
socket
:
<%= mysql_socket %>
<% else -%>
host
:
localhost
<% end -%>
production
:
adapter
:
mysql2
encoding
:
utf8
<<
:
*default
database
:
<%= app_name %>_production
pool
:
5
username
:
root
password
:
<% if mysql_socket -%>
socket
:
<%= mysql_socket %>
<% else -%>
host
:
localhost
<% end -%>
railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml
浏览文件 @
8ed188ca
...
...
@@ -16,24 +16,22 @@
# prefetch_rows: 100
# cursor_sharing: similar
#
development
:
default
:
&default
adapter
:
oracle
database
:
<%= app_name %>_development
username
:
<%= app_name %>
password
:
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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
<<
:
*default
database
:
<%= app_name %>_test
username
:
<%= app_name %>
password
:
production
:
adapter
:
oracle
<<
:
*default
database
:
<%= app_name %>_production
username
:
<%= app_name %>
password
:
railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml
浏览文件 @
8ed188ca
...
...
@@ -14,14 +14,19 @@
# Configure Using Gemfile
# gem 'pg'
#
de
velopment
:
de
fault
:
&default
adapter
:
postgresql
encoding
:
unicode
database
:
<%= app_name %>_development
# For details on connection pooling, see rails configration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool
:
5
username
:
<%= app_name %>
password
:
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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.
...
...
@@ -44,19 +49,9 @@ development:
# 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
<<
:
*default
database
:
<%= app_name %>_test
pool
:
5
username
:
<%= app_name %>
password
:
production
:
adapter
:
postgresql
encoding
:
unicode
<<
:
*default
database
:
<%= app_name %>_production
# For details on connection pooling, see rails configration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool
:
5
username
:
<%= app_name %>
password
:
railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml
浏览文件 @
8ed188ca
...
...
@@ -3,23 +3,23 @@
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development
:
#
default
:
&default
adapter
:
sqlite3
database
:
db/development.sqlite3
pool
:
5
timeout
:
5000
development
:
<<
:
*default
database
:
db/development.sqlite3
# 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
<<
:
*default
database
:
db/test.sqlite3
pool
:
5
timeout
:
5000
production
:
adapter
:
sqlite3
<<
:
*default
database
:
db/production.sqlite3
pool
:
5
timeout
:
5000
railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml
浏览文件 @
8ed188ca
...
...
@@ -21,37 +21,27 @@
# If you can connect with "tsql -S servername", your basic FreeTDS installation is working.
# 'man tsql' for more info
# Set timeout to a larger number if valid queries against a live db fail
de
velopment
:
#
de
fault
:
&default
adapter
:
sqlserver
encoding
:
utf8
reconnect
:
false
database
:
<%= app_name %>_development
username
:
<%= app_name %>
password
:
timeout
:
25
dataserver
:
from_freetds.conf
development
:
<<
:
*default
database
:
<%= app_name %>_development
# 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
:
sqlserver
encoding
:
utf8
reconnect
:
false
<<
:
*default
database
:
<%= app_name %>_test
username
:
<%= app_name %>
password
:
timeout
:
25
dataserver
:
from_freetds.conf
production
:
adapter
:
sqlserver
encoding
:
utf8
reconnect
:
false
<<
:
*default
database
:
<%= app_name %>_production
username
:
<%= app_name %>
password
:
timeout
:
25
dataserver
:
from_freetds.conf
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录