Open
Conversation
8b98862 to
ba5192c
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds a conditional seeding mechanism to the Django development environment. The changes allow the seed command to check if the database is already seeded before running, preventing unnecessary re-seeding in local development environments.
- Added a
--check_firstflag to the seed management command - Modified the development entrypoint to use the new flag
- Implemented logic to skip seeding if a BadgrApp with the configured ID already exists
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docker/entrypoint-dev.sh | Updates the seed command to include the --check_first flag |
| apps/mainsite/management/commands/seed.py | Adds the conditional seeding logic and command line argument |
Comments suppressed due to low confidence (1)
334ffb1 to
1bd49c8
Compare
ba5192c to
d21bfbc
Compare
Contributor
Author
d21bfbc to
9a93454
Compare
9a93454 to
2098550
Compare
Contributor
|
Do we still need this PR? |
This adds a commandline parameter --check_first when seeding, to skip seeding if the database already has data. We check for BadgrApp with id=1 and if found, bail out.
2098550 to
aef6a98
Compare
Contributor
Author
@Iso5786 , yes. This MR ensures that if we run "docker compose up" or "podman compose up" locally:
|
Contributor
Author
|
@Iso5786 can you give this PR a review? |
Contributor
Author
|
@Iso5786 bump 😉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.