Skip to content

Make Parcel Names Unique#1825

Merged
Mythicaeda merged 3 commits into
developfrom
fix/parcel-names-unique
May 12, 2026
Merged

Make Parcel Names Unique#1825
Mythicaeda merged 3 commits into
developfrom
fix/parcel-names-unique

Conversation

@Mythicaeda
Copy link
Copy Markdown
Contributor

Description

Adds a uniqueness constraint to parcel names in the DB.

The up migration will automatically deduplicate parcel names, repeating the process until there are no more duplicate names.

Note: I've set this PR's migration to one higher than #1822, as I expect that PR to be merged first.

Verification

I manually set up a DB where there with multiple parcels with unique names, multiple parcels named parcel, and a parcel named parcel(1) (which is the deduplication naming pattern). I then ran the DB migration via the Python script and observed that conflicting names were correctly deduplicated.

- also goes through and adds (1), (2), ...etc, to parcels with duplicate names
@Mythicaeda Mythicaeda requested review from AaronPlave and dandelany May 1, 2026 14:54
@Mythicaeda Mythicaeda self-assigned this May 1, 2026
@Mythicaeda Mythicaeda requested a review from a team as a code owner May 1, 2026 14:54
@Mythicaeda Mythicaeda added fix A bug fix sequencing Anything related to the sequencing domain database Anything related to the database labels May 1, 2026
Copy link
Copy Markdown
Collaborator

@dandelany dandelany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tested including local migration (up AND down, since we made a mistake the first time!) Only (minor, nonbreaking) issue is UI - for future reference:

  • We should have a better error message for this case to make it clear why it failed - just says "Failed"
  • Ideally should revert the unsaved text to the last saved name and not gray out the save button on unsuccessful save.

I'll wrap these into a future UI issue

@Mythicaeda Mythicaeda merged commit 3bcfcc1 into develop May 12, 2026
17 checks passed
@Mythicaeda Mythicaeda deleted the fix/parcel-names-unique branch May 12, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database Anything related to the database fix A bug fix sequencing Anything related to the sequencing domain

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce unique names on sequence parcels

2 participants