You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to use the latest Ash 3.0.7 support for where clauses in identities:
# in the identities blockidentity:name,[:name]donils_distinct?falsewhereexpr(is_nil(archived_at))end# and in the postgres blockidentity_wheres_to_sqlname: "archived_at is null"
The migration generated for this, when run throws this error:
** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near "NULLS"
query: CREATE UNIQUE INDEX "pipeline_defns_name_index" ON "pipeline_defns" (name) NULLS NOT DISTINCT WHERE archived_at is null
Upon removing the nils_distinct? false line and regenerating the migration then running it gives:
Indeed, the migration up function just does a create unique_index(...) and does not attempt to alter the index or delete and recreate it.
To Reproduce
See above for reproduction.
Expected behavior
The SQL for NULLS NOT DISTINCT should be correct, but postgresql doesn't like it.
The migration generated should alter or recreate the index, not attempt to create an already-extant index.
Runtime
Elixir version 1.16.2
Erlang version 26
OS Ubuntu 22.04
Ash version 3.0.7
any related extension versions
Postgresql is version 14.11
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to use the latest Ash 3.0.7 support for where clauses in identities:
The migration generated for this, when run throws this error:
Upon removing the
nils_distinct? false
line and regenerating the migration then running it gives:Indeed, the migration
up
function just does acreate unique_index(...)
and does not attempt to alter the index or delete and recreate it.To Reproduce
See above for reproduction.
Expected behavior
The SQL for NULLS NOT DISTINCT should be correct, but postgresql doesn't like it.
The migration generated should alter or recreate the index, not attempt to create an already-extant index.
Runtime
Postgresql is version 14.11
The text was updated successfully, but these errors were encountered: