I really liked how Planet Argon didn’t run postgres as a daemon/service but as an instance application for development. They used migrations to create the table structure so that the code can be ported back into the production environment or onto another developer’s laptop.
Here is the abridged steps for my own reference
If you want detail read the full article below.
initdb -D pgdatapg_ctl -D pgdata -l pgdata/psql.log startcreatedb argon_developmentpsql argon_developmentrails -d postgresql argoncd argon./script/generate model Argonistavi db/migrate/001_create_argonistas.rbvi config/database.ymlrake db:migrate
Install Ruby, Rails, and PostgreSQL on OSX
I’m still not sure if I’ll go with Postgres or MySQL but these steps should work on both. In fact with a migration file, I think you can have developers using postgres and the server could be mysql. Although the development will want to decide on a database platform before making any database specific calls.
technorati tags:Ruby, Rails, Migrations, Postgres