Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix empty database migrations #1136

Merged
merged 3 commits into from
Dec 4, 2024
Merged

fix empty database migrations #1136

merged 3 commits into from
Dec 4, 2024

Conversation

shapiromatron
Copy link
Owner

It's been a long time since we started a fresh version of hawc, and we had few issues where if you run django database migrations from scratch, it didn't work.

  1. Fixed an error where a batch_size is now required when using prefetch_related and iterator
  2. Fixed an issue where a vocab fixture attempted to load a deprecated field, before the deprecated field was created.

To check, update your local.py settings to use a database named foo, and then:

dropdb -U hawc foo
createdb -U hawc foo
python manage.py migrate

@shapiromatron shapiromatron marked this pull request as ready for review November 21, 2024 20:45
Copy link
Collaborator

@caseyhans caseyhans left a comment

Choose a reason for hiding this comment

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

Nice! Works like a charm.

@caseyhans caseyhans removed their assignment Dec 4, 2024
@shapiromatron shapiromatron merged commit bdd47bb into main Dec 4, 2024
6 checks passed
@shapiromatron shapiromatron deleted the clean-migrate branch December 4, 2024 12:20
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