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: prevent django from generating unnecessary migrations #475

Merged
merged 1 commit into from Jan 19, 2024

Conversation

danipran
Copy link
Contributor

No description provided.

@danipran danipran requested a review from a team January 16, 2024 13:32
@terovirtanen
Copy link
Contributor

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr475.api.dev.hel.ninja 🚀🚀🚀

charn
charn previously approved these changes Jan 17, 2024
Copy link
Contributor

@charn charn left a comment

Choose a reason for hiding this comment

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

LGTM! 👍 :shipit:

@terovirtanen
Copy link
Contributor

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr475.api.dev.hel.ninja 🚀🚀🚀

If the value of PROTECTED_ROOT env variable
changes, Django would generate a migration
for this. However, local and production
environments might have different values
for that, which leads to warnings when
checking for missing migrations.

This commit adds a dummy storage subclass
to prevent Django from creating these
migrations.
@danipran danipran changed the title fix: add missing migration fix: prevent django from generating unnecessary migrations Jan 17, 2024
@danipran danipran requested a review from charn January 17, 2024 12:50
@danipran
Copy link
Contributor Author

danipran commented Jan 17, 2024

The content of the PR changed a bit. Still adds a migration, but also adds a dummy FileSystemStorage subclass to prevent Django from making unnecessary migrations every time the value of PROTECTED_ROOT changes. This also makes the brand-new check for missing migrations in the pipeline work.

@terovirtanen
Copy link
Contributor

KERROKANTASI-API branch is deployed to platta: https://kerrokantasi-pr475.api.dev.hel.ninja 🚀🚀🚀

Copy link

sonarcloud bot commented Jan 17, 2024

@danipran danipran dismissed charn’s stale review January 17, 2024 13:05

Content of the PR has changed too much from the original

@danipran danipran requested a review from a team January 18, 2024 06:46
Copy link
Contributor

@charn charn left a comment

Choose a reason for hiding this comment

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

LGTM! 👍 :shipit:

@danipran danipran merged commit b3b6f19 into master Jan 19, 2024
23 checks passed
@danipran danipran deleted the add-missing-migration branch January 19, 2024 08:06
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.

None yet

3 participants