bindings-macro: add custom index name to prevent index name collisions#4725
Open
rudcode wants to merge 1 commit intoclockworklabs:masterfrom
Open
bindings-macro: add custom index name to prevent index name collisions#4725rudcode wants to merge 1 commit intoclockworklabs:masterfrom
rudcode wants to merge 1 commit intoclockworklabs:masterfrom
Conversation
1df6c4d to
54d66af
Compare
Author
|
I am just thinking, this maybe makes it hard to distinguish between old 1.x and 2.x syntax. Because old 1.x use |
Author
|
Force pushed to add error message if |
This file contains hidden or 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
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.
Description of Changes
SpacetimeDB generates colliding index names like
product_category_id_idx_btree(category_idinproductandidinproduct_categorymaking sameproduct_category_idprefix) , causing spacetime publish to fail withname used for multiple entities.This PR allow users to specify custom index names:
API and ABI breaking changes
None
Expected complexity level and risk
Complexity: 1
A simple change to only bindings-macro/src/table.rs. No breaking changes.
Testing
Manual testing with the reproducer from Issue #4719 - spacetime publish now succeeds when unique index names are provided. And when custom index name is changed, it successfully migrated.