openplans/openblock — pull request #289 by bretwalker (2013-02-03 04:42:02+00:00)
Title: Fix migration issue

I got an error when running my initial migrations.
One of the migrations didn't have an order_by that Postgres wanted.

This change fixes this error:

Error in migration: db:0026_make_unique_lookup_names
DatabaseError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT DISTINCT ON ("db_lookup"."name") "db_lookup"."name", ...