Never knowingly knowing narwhals

Author Archives: dazza

SQLAlchemy-Migrate upgrade scripts in a transaction

SQLAlchemy Migrate is a really good tool for managing database upgrades for SQLAlchemy centric projects. I’ve been using it for 6 months on New Metal Army and I haven’t had a screwed website upgrade yet! For those that don’t know SQLAlchemy-migrate allows you to version control database changes and easily upgrade and downgrade a database. [...]

FreeBSD 7.0: installing psycopg 2.07

While setting up a new FreeBSD 7.0 server I found that psycopg 2.0.7 doesn’t easy_install on FreeBSD. It’s because of a configuration problem in config.h at the bottom. #if defined(__FreeBSD__) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) /* what’s this, we have no round function either? */ static double round(double num) { return (num >= 0) [...]

Mac OSX: starting postgres on boot

Every bloody operating system has it’s own unique way of starting things at boot time. Today I bothered to learn how OS X does it. Here’s how I got PostgreSQL to start when my machine is turned on: What gets started is handled by a program called SystemStarter. On boot it looks through /Library/StartupItems for [...]