Skip to content

Conversation

@bretwalker
Copy link
Contributor

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", ...

Bret Walker added 2 commits February 2, 2013 23:38
DatabaseError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT DISTINCT ON ("db_lookup"."name") "db_lookup"."name", ...
Added order_by because I was getting the following error:

DatabaseError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT DISTINCT ON ("db_lookup"."name") "db_lookup"."name", ...
@jheasly
Copy link

jheasly commented Oct 4, 2013

Same issue. This worked for me! (Would be nice to see it pulled in!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants