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

fix: creating a unique index in postgres using the index method #5601

Merged
merged 3 commits into from Jul 4, 2023

Conversation

awo00
Copy link
Contributor

@awo00 awo00 commented Jun 12, 2023

This is a fix for the issue described here: #5217

The indexType option was being used for the storage type instead of storageEngineIndexType 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.

@coveralls
Copy link

Coverage Status

coverage: 92.788% (+0.003%) from 92.785% when pulling 4ab0d44 on awo00:fix-postgres-indexType-unique into c8da0df on knex:master.

@OlivierCavadenti OlivierCavadenti merged commit 2da5822 into knex:master Jul 4, 2023
53 checks passed
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants