Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for partial indexes #322

Open
asomethings opened this issue Mar 20, 2024 · 1 comment
Open

Support for partial indexes #322

asomethings opened this issue Mar 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@asomethings
Copy link

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.

@exekias
Copy link
Member

exekias commented Mar 20, 2024

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')"
}

@exekias exekias added the enhancement New feature or request label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants