Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support partial indexing #883
In ActiveRecord you can do this:
It would be nice if we could do it like this in Ecto:
The only way I have figured out to do this in Ecto is to use the execute function:
I had a go at this.
Currently just send a string into the
def change do create index(:posts, [:permalink], unique: true, where: "public IS TRUE") end
I haven't tried using ecto query syntax yet, but the Postgres implementation of partial indexes supports full query syntax, so it should be useful.
Any suggestions for how to try to use the query syntax would be welcome