【发布时间】:2017-08-25 19:35:55
【问题描述】:
我目前正在尝试从 SQlite3 切换到 Postgres,并且想知道如何更改我的数据库名称?根据 Heroku 的说法,他们说this:
注意适配器名称是
postgresql而不是postgres或pg。你也会 需要更改数据库:为自定义名称。最终版本可能 看起来像这样:
development:
adapter: postgresql
database: my_database_development
pool: 5
timeout: 5000
test:
adapter: postgresql
database: my_database_test
pool: 5
timeout: 5000
production:
adapter: postgresql
database: my_database_production
pool: 5
timeout: 5000
我现在看到我的测试环境的数据库名称如下:
test:
<<: *default
database: db/test.sqlite3
对于这个(以及开发和生产环境),我需要简单地更改数据库的名称,还是需要做更多的事情。因为对于 SQLite3 文件,它具有 .sqlite3 扩展名。 postgres有类似情况吗?
【问题讨论】:
标签: ruby-on-rails postgresql heroku sqlite