AE
Ash Elixir•3y ago
Blibs

Support GIST indexes in `custom_indexes` code block

Do Ash Postgres supports more complex indexes in custom_indexes? Right now I'm using custom_statements for it:
custom_statements do
statement :my_index_1 do
up "create index my_index_1 on properties using gist (geography);"
down "drop index my_index_1;"
end

statement :my_index_2 do
up "create index my_index_2 on properties using gist (geography(geography));"
down "drop index my_index_2;"
end
end
custom_statements do
statement :my_index_1 do
up "create index my_index_1 on properties using gist (geography);"
down "drop index my_index_1;"
end

statement :my_index_2 do
up "create index my_index_2 on properties using gist (geography(geography));"
down "drop index my_index_2;"
end
end
But I would love to change this to use custom_indexes.
5 Replies
ZachDaniel
ZachDaniel•3y ago
The custom indexes dsl should support the with option for this kind of thing, does that not work?
Blibs
BlibsOP•3y ago
Hmm, where there is documentation about this option? I can't find it anywhere
ZachDaniel
ZachDaniel•3y ago
Sorry, its the using option 🙂
ZachDaniel
ZachDaniel•3y ago
Ash HQ
Ash.Resource
View the documentation for Ash.Resource on Ash HQ.
ZachDaniel
ZachDaniel•3y ago
I misspoke

Did you find this page helpful?