GitBulletin

Repository: farcasterxyz/hub-monorepo

**Data Redeemed! New Update Strengthens Unique Username Enforcement!**

2024-06-03 17:54:22 UTC

**Transformative fix enhances user data integrity by enforcing fnames_username_unique constraint, ensuring seamless data transfer and unrivaled security!**

Commit Details:

fix(replicator): respect fnames_username_unique constraint (#1971) ## Motivation When a fname is transfered, the fnames_username_unique prevents using delete_at but requires a deletion of the data. ## Change Summary Since hubble forgets about the old fname attachement, I choosed to delete it instead of changing the constraint. * fname <=> old fid is now deleted * userproof <=> old fid is now deleted ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [X] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [X] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [X] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) ## Additional Context closes farcasterxyz/hub-monorepo#1970 <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on respecting the `fnames_username_unique` constraint in `usernameProof.ts`. ### Detailed summary - Added patch to respect `fnames_username_unique` constraint - Updated `processUserNameProofRemove` to delete from and insert into `fnames` table based on conditions - Changed `updateTable` to `deleteFrom` in `processUserNameProofRemove` for `usernameProofs` table - Updated conditions in `processUserNameProofRemove` to include `fid` when deleting from `fnames` table > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar