Skip to content

Fix: DataInitializer re-runs on every restart crashing the app - #18

Merged
PathNotFound404 merged 1 commit into
mainfrom
Frontend
Apr 30, 2026
Merged

PathNotFound404 merged 1 commit into
mainfrom
Frontend

Conversation

@PathNotFound404

Copy link
Copy Markdown
Owner

DataInitializer had no guard against running on subsequent container restarts. On redeployment, duplicate inserts hit the unique constraint on admin/student emails, throwing DataIntegrityViolationException and preventing the app from starting -- causing Azure to keep serving the old container. Added an early-return check so seeding only happens once on a fresh database.

DataInitializer had no guard against running on subsequent container
restarts. On redeployment, duplicate inserts hit the unique constraint
on admin/student emails, throwing DataIntegrityViolationException and
preventing the app from starting -- causing Azure to keep serving the
old container. Added an early-return check so seeding only happens
once on a fresh database.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@PathNotFound404
PathNotFound404 merged commit 4aef442 into main Apr 30, 2026
2 checks passed
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.

1 participant