fix: preserve bridge.to_address (partial cherry-pick of PR #1452) v0.8.x#1499
Merged
joanestebanr merged 5 commits intorelease/0.8from Mar 2, 2026
Merged
Conversation
joanestebanr
added a commit
that referenced
this pull request
Feb 27, 2026
#1452) ## 🔄 Changes Summary ### Migration scripts conflicts | migration | v0.8.1 | v0.9.0 / develop | |-----------|------------------------------------------|--------------------------------------------------------| | 11 | | ✅ | | 12 | + claim.type, + bridge.to_address | ✅ same ❌ +bridge.source ❌ +backward_let, ... | | 13 | + bridge.to_address default | ❌ don't exists | The main conflict is that migration 12 add `bridge.source` for >v0.8.1: - Sqlite doesn't have `ALTER TABLE IF NOT EXISTS FIELD...`. So from a `sql` file it's not possible to solve the problem - Migration library `github.com/rubenv/sql-migrate` have no way of doing that if sql doesn't support it Solution: - Add a indempotent function that is called in each migration that add the field if doesn't exists ### Delete `bridge.to_address` content to set `DEFAULT ''` - To modify the default values of this field it drop the field and add again. This migration is 13 only in v0.8.1. - The idea is copy this value before modifying the field, this is going to a modification of migration 13 for v0.8.1 that will be useful if you are comming from a v0.7.x to v0.8.2 (pending PR) ## 🔗 Related PRs - #1453 - #1499 - --------- Co-authored-by: joanestebanr <129153821+joanestebanr@users.noreply.github.com>
## 🔄 Changes Summary - This PR fixes a bug in claims count logic ## 🐞 Issues - Closes #1391
|
arnaubennassar
approved these changes
Mar 2, 2026
joanestebanr
added a commit
that referenced
this pull request
Mar 2, 2026
#1452) | migration | v0.8.1 | v0.9.0 / develop | |-----------|------------------------------------------|--------------------------------------------------------| | 11 | | ✅ | | 12 | + claim.type, + bridge.to_address | ✅ same ❌ +bridge.source ❌ +backward_let, ... | | 13 | + bridge.to_address default | ❌ don't exists | The main conflict is that migration 12 add `bridge.source` for >v0.8.1: - Sqlite doesn't have `ALTER TABLE IF NOT EXISTS FIELD...`. So from a `sql` file it's not possible to solve the problem - Migration library `github.com/rubenv/sql-migrate` have no way of doing that if sql doesn't support it Solution: - Add a indempotent function that is called in each migration that add the field if doesn't exists - To modify the default values of this field it drop the field and add again. This migration is 13 only in v0.8.1. - The idea is copy this value before modifying the field, this is going to a modification of migration 13 for v0.8.1 that will be useful if you are comming from a v0.7.x to v0.8.2 (pending PR) - #1453 - #1499 - --------- Co-authored-by: joanestebanr <129153821+joanestebanr@users.noreply.github.com>
joanestebanr
added a commit
that referenced
this pull request
Mar 2, 2026
….1 and v0.9.0/develop (#1508) cherry-pick (#1452) ## 🔄 Changes Summary ### Migration scripts conflicts | migration | v0.8.1 | v0.9.0 / develop | |-----------|------------------------------------------|--------------------------------------------------------| | 11 | | ✅ | | 12 | + claim.type, + bridge.to_address | ✅ same ❌ +bridge.source ❌ +backward_let, ... | | 13 | + bridge.to_address default | ❌ don't exists | The main conflict is that migration 12 add `bridge.source` for >v0.8.1: - Sqlite doesn't have `ALTER TABLE IF NOT EXISTS FIELD...`. So from a `sql` file it's not possible to solve the problem - Migration library `github.com/rubenv/sql-migrate` have no way of doing that if sql doesn't support it Solution: - Add a indempotent function that is called in each migration that add the field if doesn't exists ### Delete `bridge.to_address` content to set `DEFAULT ''` - To modify the default values of this field it drop the field and add again. This migration is 13 only in v0.8.1. - The idea is copy this value before modifying the field, this is going to a modification of migration 13 for v0.8.1 that will be useful if you are comming from a v0.7.x to v0.8.2 (pending PR) ## 🔗 Related PRs - #1453 - #1499 - #1452 --------- Co-authored-by: Rachit Sonthalia <54906134+rachit77@users.noreply.github.com>
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.



🔄 Changes Summary
Cherry-pick #1395
Preserve to_address when set
bridge.to_addresstoDEFAULT ''🔗 Related PRs