[英]Adding a second SQLite db in Ruby on Rails
I have a ROR application with a sqlite3 db. 我有一个带sqlite3 db的ROR应用程序。 I want to create a new database, and I do not want to delete the previous one. 我想创建一个新数据库,并且不想删除前一个数据库。
generally what is the process to add a new sqlite db in the existing project? 通常,在现有项目中添加新的sqlite数据库的过程是什么?
Just change database name in database.yml
file 只需更改database.yml
文件中的数据库名称
development:
database: 'changed ndb_name'
...
Follow the below steps: 请按照以下步骤操作:
rake db:create
rake db:migrate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.