Skip to content

Conversation

@shanbady
Copy link
Contributor

@shanbady shanbady commented Jul 2, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/4687

Description (What does it do?)

This PR adds a "data fixtures" app that exists for the purpose of updating/loading static fixtures in both local and prod environments. for discussion around this reference the discussion topic https://github.com/mitodl/hq/discussions/4747

The idea is that this app will run its data migrations for local development as well as when deploying but not when running tests

In addition to adding the app, this PR also add initial fixture data for testimonials (copied from production)

How can this be tested?

  1. Checkout this branch
  2. do a docker compose down/up and note that fixtures for attestation are loaded in via django admin. alernatively if you want to avoid doing a docker down/up you can run RUN_DATA_MIGRATIONS=true python manage.py migrate

This was referenced Jul 2, 2024
@shanbady shanbady marked this pull request as ready for review July 2, 2024 17:47
@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Jul 2, 2024
@shanbady shanbady changed the title adding data fixtures app and conditionalizing for deploy adding data fixtures app for loading static fixtures Jul 2, 2024
@shanbady shanbady changed the title adding data fixtures app for loading static fixtures Data fixtures app for loading static fixtures Jul 2, 2024
@gumaerc gumaerc self-assigned this Jul 3, 2024
Copy link
Contributor

@gumaerc gumaerc left a comment

Choose a reason for hiding this comment

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

👍

I simply did docker compose stop / docker compose up and my database was automatically populated with attestations. I just have a basic non-blocking question:

@shanbady shanbady merged commit 08d1994 into main Jul 8, 2024
@shanbady shanbady deleted the shanbady/data-fixtures-app branch July 8, 2024 13:15
This was referenced Jul 8, 2024
mbertrand pushed a commit that referenced this pull request Jul 15, 2024
* adding data fixtures app and conditionalizing for deploy

* removing dependency

* removing unused apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants