Skip to content

Add actual SQLAlchemy Sequence objects so db can be initialized with SQLAlchemy#3471

Open
MoralCode wants to merge 10 commits intomainfrom
ntdn/sequences
Open

Add actual SQLAlchemy Sequence objects so db can be initialized with SQLAlchemy#3471
MoralCode wants to merge 10 commits intomainfrom
ntdn/sequences

Conversation

@MoralCode
Copy link
Contributor

@MoralCode MoralCode commented Dec 15, 2025

Description
This was initially discovered while trying to fix the test fixtures to get the database-dependent tests back up and running. It was something that prevented databases created purely with SQLAlchemy (rather than replaying every migration) from successfully coming up.

Converting these values to use SQLAlchemy allows SQLAlchemy to emit the correct SQL to generate these sequences in the database again.

This was originally part of #3435 but is being factored out to keep the diff of that change small.

This change incorporates feedback from @shlokgilda in the above-mentioned PR that says that SQLAlchemy sequences don't inherit the table's schema automatically

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

@MoralCode MoralCode added the database Related to Augur's unifed data model label Dec 15, 2025
@sgoggins sgoggins self-assigned this Dec 16, 2025
sgoggins
sgoggins previously approved these changes Dec 16, 2025
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

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

Lets test it!

@MoralCode MoralCode force-pushed the ntdn/sequences branch 2 times, most recently from bc44e60 to f8b4e37 Compare February 10, 2026 19:51
@MoralCode MoralCode added the high priority Blocking multiple other things, causing data loss, or other incredibly urgent things label Feb 12, 2026
@MoralCode MoralCode moved this to In Progress in Augur TSC Feb 15, 2026
@MoralCode MoralCode moved this from In Progress to Dev Testing in Augur TSC Feb 15, 2026
@sgoggins
Copy link
Member

@MoralCode : Flag this one for me when you think its ready.

@MoralCode MoralCode changed the title Convert string sequence calls to actual SQLAlchemy Sequence objects Add actual SQLAlchemy Sequence objects so db can be initialized with SQLAlchemy Feb 17, 2026
…calls

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
…calls

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
How this ever got like this is beyond me

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
ABrain7710
ABrain7710 previously approved these changes Feb 18, 2026
sgoggins
sgoggins previously approved these changes Feb 18, 2026
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Adrian Edwards <17362949+MoralCode@users.noreply.github.com>
@MoralCode MoralCode dismissed stale reviews from sgoggins and ABrain7710 via 874fda0 February 18, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database Related to Augur's unifed data model high priority Blocking multiple other things, causing data loss, or other incredibly urgent things

Projects

Status: Dev Testing

Development

Successfully merging this pull request may close these issues.

3 participants