Add breach data model and sync command #13782
Closed
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.
Fixes #13611, #13612
One-line summary
Add breach Django model and syncing management command.
Issue / Bugzilla link
#13611
#13612
Testing
To test locally:
(Optional) Pull down a fresh dev db. If you want to repeat this testing after having done these steps once, this will reset your database back to current "dev" state. This (or a
make preflight
) would also be advised to do when you're done testing this branch.Run the migration to create the breaches database table.
Run the management command to sync the breaches, overriding the
STATIC_URL
environment variable since we need this to set the correct breach logo URLs. Normally this will run on our deployments on an interval and wouldn't be needed locally, but until this is merged we need to simulate a sync run as if we're on dev.This requires
gcloud
to be set up so we can upload to GCS. Make sure you're auth'd.Then run the sync: