Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migration issue #289

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix migration issue #289

wants to merge 2 commits into from

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.

None yet

2 participants