xataio / pgroll

PostgreSQL zero-downtime migrations made easy

Home Page:https://www.xata.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for partial indexes

asomethings opened this issue · comments

Our team tried to use pgroll for our new project and found out that it doesn't seem to have a partial index support.

It seems there were mentions while adding support for indexes (#49) but seems like it is not still implemented.

Since our new project highly depends on partial index, we're wondering if there is any plan for adding this feature.

Thank you for opening this! Support for partial indexes is indeed still pending. For now the alternative would be to use the sql migration to create them on your own, ie:

{
  "sql": {
    "up": "CREATE INDEX access_log_client_ip_ix ON access_log (client_ip)
           WHERE NOT (client_ip > inet '192.168.100.0' AND
           client_ip < inet '192.168.100.255')"
}