How to create a partial index with Ash?
I was wondering, can I create a partial index using identities or some other way with Ash or should I just write a migration manually directly?
For example, how can I do this partial index?
7 Replies
Found 3 results in ash_postgres:
* custom_indexes: https://ash-hq.org/docs/dsl/ash_postgres/1.3.9/ashpostgres/postgres/custom_indexes
* custom_indexes: https://ash-hq.org/docs/module/ash_postgres/1.3.9/ashpostgres-datalayer-info#function-custom_indexes-1
* custom_indexes: https://ash-hq.org/docs/module/ash_postgres/1.3.9/ashpostgres#function-custom_indexes-1
You can do it with
custom_indexes
😄
that top resultSorry, I was trying to search the docs with the
partial
word 😅would go inside the
postgres
section, like:
no worries 😄 I think its on us to include common search terms in the docs for things
so that people can find it better when searching 😄And I guess if I want to make the changeset aware of that index I need to use check_constrains right?
nope, it will be aware of that index 🙂
Nice!