Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix migration error in token due to missing userid field #8546

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented Feb 22, 2024

Replace imports from h.models with local ORM classes. The ORM classes in h.models assume the DB has the latest schema, which is not the case when running migrations. The new code matches how other migrations work.

Fixes #8541

Testing:

I ran make db and that initially failed with the error mentioned in #8541. After this change I was able to run make db and it successfully populated the token.user_id field in the DB.

@robertknight robertknight requested a review from seanh February 22, 2024 11:54
Replace imports from `h.models` with local ORM classes. The ORM classes in
`h.models` assume the DB has the latest schema, which is not the case when
running migrations. The new code matches how other migrations work.

Fixes #8541
@robertknight robertknight force-pushed the fix-token-migration-error branch from 044224b to e7fa258 Compare February 22, 2024 12:12
@robertknight robertknight merged commit 8bee784 into main Feb 23, 2024
9 checks passed
@robertknight robertknight deleted the fix-token-migration-error branch February 23, 2024 13:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants