Backup databases, why use the same DBMS for development and production?

I really cannot find an exact explanation why you should use the same database in development as in production. I personally like to use sqlite3 in development (it is lightweight, easy to use and has a nice browser GUI tool with sqlite support), and then use postgres in production with geroku. But I keep hearing that from RBates or Michael Hartl or from someone else that you should use the same database in both, why this?

+4
source share
1 answer

I used SQLite3 in development and PostgreSQL to create my first few Rails projects. Just today, I switched the current project development environment to PostgreSQL.

When I first deployed my application to Heroku, I spent two days fixing bugs caused by database migrations. Migrations worked fine in SQLite3, but burst into PostgreSQL. If I used one DB, I would avoid debugging this time.

This morning I tried to use some SQL queries. If you use only requests for rails, you can get away with switching databases. When you start writing SQL, you begin to see problems. Check out my question and solution here: Ruby strftime '% -m' does not work in request

- SQL- strftime, .

, .

+7

All Articles