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
fix: creating a unique index in postgres using the index method #5601
Merged
OlivierCavadenti
merged 3 commits into
knex:master
from
awo00:fix-postgres-indexType-unique
Jul 4, 2023
Merged
fix: creating a unique index in postgres using the index method #5601
OlivierCavadenti
merged 3 commits into
knex:master
from
awo00:fix-postgres-indexType-unique
Jul 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OlivierCavadenti
force-pushed
the
fix-postgres-indexType-unique
branch
from
July 4, 2023 10:44
4c0e36b
to
4ab0d44
Compare
OlivierCavadenti
approved these changes
Jul 4, 2023
ukstv
added a commit
to ceramicnetwork/js-ceramic
that referenced
this pull request
Jul 10, 2023
Knex 2.5.0 fixed the behavior of the index type. Previously indices would be created with the default postgres index type of btree. To maintain previous behavior, we need to set all indices to have type of btree rather than hash. See knex/knex#5601 for more information on change.
3benbox
added a commit
to ceramicnetwork/js-ceramic
that referenced
this pull request
Jul 10, 2023
* Update observablity to 0.14.1, fix index btree type test * bug(core): Fix index type due to knex 2.5.0 changes Knex 2.5.0 fixed the behavior of the index type. Previously indices would be created with the default postgres index type of btree. To maintain previous behavior, we need to set all indices to have type of btree rather than hash. See knex/knex#5601 for more information on change. --------- Co-authored-by: Sergey Ukustov <sergey@ukstv.me>
stbrody
pushed a commit
to ceramicnetwork/js-ceramic
that referenced
this pull request
Jul 10, 2023
* Update observablity to 0.14.1, fix index btree type test * bug(core): Fix index type due to knex 2.5.0 changes Knex 2.5.0 fixed the behavior of the index type. Previously indices would be created with the default postgres index type of btree. To maintain previous behavior, we need to set all indices to have type of btree rather than hash. See knex/knex#5601 for more information on change. --------- Co-authored-by: Sergey Ukustov <sergey@ukstv.me> Cherry-picked from commit 92bfbce
stbrody
pushed a commit
to ceramicnetwork/js-ceramic
that referenced
this pull request
Jul 11, 2023
* Update observablity to 0.14.1, fix index btree type test * bug(core): Fix index type due to knex 2.5.0 changes Knex 2.5.0 fixed the behavior of the index type. Previously indices would be created with the default postgres index type of btree. To maintain previous behavior, we need to set all indices to have type of btree rather than hash. See knex/knex#5601 for more information on change. --------- Co-authored-by: Sergey Ukustov <sergey@ukstv.me> (cherry picked from commit 92bfbce)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for the issue described here: #5217
The
indexType
option was being used for the storage type instead ofstorageEngineIndexType
as in the documentation.I've change the method to follow the options as in the documentation. There also appeared to be to option to pass in a string as instead of an options object. I've left this as the
storageEngineIndexType
as it was previously, although this is not mentioned in the documentation.I've also updated the tests and added a new one for this scenario.