Skip to content

fix: create the restricted-word sequences when a fresh database has none - #2057

Merged
Oluwapizzy merged 2 commits into
mainfrom
fix/restricted-word-migration-sequences
Dec 2, 2026
Merged

Oluwapizzy merged 2 commits into
mainfrom
fix/restricted-word-migration-sequences

Conversation

@Oluwapizzy

Copy link
Copy Markdown
Collaborator

Issue #: bcgov/entity#31439 (follow-up to #2050)

Description of changes:

  • API unit tests fail in setup with relation "restricted_condition_cnd_id_seq" does not exist. Migration c4e8a1b27f09 uses that sequence and restricted_word_word_id_seq, but no migration creates them, so a fresh database fails.
  • Before repairing each id column, create the sequence only if it is missing, starting one past the current max id. Databases that already have the sequence are unchanged.
  • The fix is in the existing revision because a fresh database never reaches a later one. Databases already past this revision will not run it again.

Same problem as #2053 (closed), with a smaller change.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

@stevenc987

Copy link
Copy Markdown
Collaborator

It seems CI still has some issues:
image

@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2026

Copy link
Copy Markdown

@Oluwapizzy
Oluwapizzy merged commit 6fa1b31 into main Dec 2, 2026
11 of 12 checks passed
@Oluwapizzy
Oluwapizzy deleted the fix/restricted-word-migration-sequences branch December 2, 2026 20:25
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