开发者

Two different databases

开发者 https://www.devze.com 2023-03-22 11:10 出处:网络
Is it possible to have two different databases for development or production? One for Heroku and one for local开发者_运维知识库 development?

Is it possible to have two different databases for development or production? One for Heroku and one for local开发者_运维知识库 development?

Heroku uses PostgreSQL but I prefer SQLlite for local development.


yes, it's totally possible - you can then use heroku db:push to push your local SQLite database into postgres running on Heroku.

BUT

And this is from personal experience, I've run into situations where SQL I've written is different between sqlite/postgres/mysql AND also gems I've used which themselves used findbysql which weren't tested against postgres and has then caught my out when I've put it on Heroku.

For the few seconds it takes to install postgres locally I would STRONGLY recommend you use the DB platform you are ultimately going to deploy to.

0

精彩评论

暂无评论...
验证码 换一张
取 消