-
-
Notifications
You must be signed in to change notification settings - Fork 550
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
[feat] migration should support partial index #872
Comments
Hey @onichandame, thanks for the proposal! As far as I know, both SQLite and PostgreSQL supported partial index, docs:
But MySQL doesn't support it. I think we could introduce this feature in SeaQuery as 2 out of 3 databases support it. Thoughts? @tyt2y3 @ikrivosheev |
Agreed |
Alright, I take that as a go! I open a tracking issue on SeaQL/sea-query#396 |
Reason to close: this issue has been moved to SeaQuery |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Sqlite supports a
WHERE
clause on creating an index. see docsThis feature is useful if only a subset of rows need to be indexed. Without it the index must cover all rows, which unnecessarily consumes more disk space.
Proposed Solutions
Something like
sea_query::Index::create().filter(<Condition>)
for use with entities, andsea_query::Index::create().filter_raw("<Where Clause>")
for more freedom.Additional Information
The text was updated successfully, but these errors were encountered: