-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/ewi local dev seed if needed #196
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
base: feature/ewi
Are you sure you want to change the base?
Conversation
8b98862 to
ba5192c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
d21bfbc to
9a93454
Compare
9a93454 to
2098550
Compare
|
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
@Iso5786 , yes. This MR ensures that if we run "docker compose up" or "podman compose up" locally:
|
|
@Iso5786 can you give this PR a review? |
|
@Iso5786 bump 😉 |
No description provided.