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
Exposed currently has no way to define partial indexes.
E.g:
CREATE UNIQUE INDEX my_index
ON table (column_a, column_b)
WHERE column_a IS NOT NULL
Use case:
Let's say I have a database of PEOPLE. Each member of PEOPLE has a "name" (text), as well as an optional reference to PEOPLE (i.e. "parent"). But I want to make sure that for each member of PEOPLE, if it has "children", each child must have a unique name. One way to implement this is to have (proposed syntax):
Exposed currently has no way to define partial indexes.
E.g:
Use case:
Let's say I have a database of PEOPLE. Each member of PEOPLE has a "name" (text), as well as an optional reference to PEOPLE (i.e. "parent"). But I want to make sure that for each member of PEOPLE, if it has "children", each child must have a unique name. One way to implement this is to have (proposed syntax):
Partial Indexes are supported by Postgresql and Sqlite, but I don't think Mysql has it.
The text was updated successfully, but these errors were encountered: