Skip to content

fix concurrent index creation#295

Merged
jinzhu merged 1 commit intogo-gorm:masterfrom
dashrews78:dashrews-fix-concurrent-index
Jan 12, 2025
Merged

fix concurrent index creation#295
jinzhu merged 1 commit intogo-gorm:masterfrom
dashrews78:dashrews-fix-concurrent-index

Conversation

@dashrews78
Copy link
Copy Markdown
Contributor

@dashrews78 dashrews78 commented Dec 20, 2024

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

This resolves issue #293. The issue was a prior PR to allow for other options blindly applied the options at the end of the SQL statement. However, concurrently does not go at the end of the SQL statement. Thus #288 broke the usage of concurrently. Used the playground pointing to this change to verify that the fix works without breaking the issue "fixed" in #288.

The playground verification go-gorm/playground#779.

User Case Description

My case is simple. I want to create an index concurrently as the documents state. The documents clearly state that concurrently is an OPTION. https://gorm.io/docs/indexes.html.

@dashrews78
Copy link
Copy Markdown
Contributor Author

@jinzhu thoughts?

@jinzhu
Copy link
Copy Markdown
Member

jinzhu commented Jan 12, 2025

Okay, let’s keep it as is for now. The CONCURRENTLY option seems to behave differently from other options. We can consider finding a better solution in the future.

@jinzhu jinzhu merged commit c172125 into go-gorm:master Jan 12, 2025
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.

2 participants