-
Notifications
You must be signed in to change notification settings - Fork 894
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
How to create DB index with NULLS FIRST
?
#4049
Comments
Here is one way to do it:
I believe this is a hack, but it does produce the desired result. However it results in a cycle in the migration logic of dropping the index and then re-creating it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a query that is frequently run on a large table that has sorting like this:
which translates to SQL like this:
How can I create a database index that includes the
NULLS FIRST
part?Currently I've got:
which produces:
but what I need is:
Alternatively is there a way to include arbitrary SQL after a column when creating a database index?
The text was updated successfully, but these errors were encountered: