On 27 November 2010 03:14, daze <dmonopol...@gmail.com> wrote: > Is it okay to have, for example, sqlite3 for development and testing, > and mysql2 for production? Is that doable/common/not too hard to > configure?
It's perfectly doable, and perfectly okay, and apparently quite common; just complete the appropriate sections of the database.yml file for each of your environments. > Should the types of databases for development, testing, and production > all be the same? "Should"? No... *don't* do it! Even though it is undoubtedly possible, and lots of people do :-) You will be making a total nightmare for yourself when code that "works" in development "doesn't pass tests", or worse, code that "passes tests" doesn't "run in production". There are too many differences across dbs; reserved words, db contraints (like index name sizes), and general SQL implementation [1]. Make your development environment as close as possible to your production, and ideally have your test environment be *identical* to production. HTH [1] Only a couple of weeks ago, there was a thread about a migration that wouldn't run for someone, which ended up being that SQLite wouldn't add not-null columns to an existing table without a default value.... MySQL will ;-) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.