Converting Rails applications from MySQL to PostgreSQL

Update (2009/09/14): There is a much better article on doing this conversion here that is specific to migrating Typo from MySQL to PostgreSQL. I will admit that I have not tried using that article's boolean conversion method.

I recently decided to give PostgreSQL a try after learning about some of the oddities of MySQL, plus it gave me an opportunity to see what was necessary to convert between two RDBMs. I installed PostgreSQL 8.3.7, which is the most recent version currently in the main Gentoo Portage tree, using the Gentoo Wiki guide. Rather than explain the details of setting up and using PostgreSQL, I'll explain what I did to convert my Redmine and Typo instances. (The following assumes some familiarity with how to use Rails, MySQL, and PostgreSQL command line commands. See their man pages as well for other options that you may want/need to use)

Click here to read more...