Skip to content
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

Task/script create contacts for existing users/2768 #2844

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

andrea-williams
Copy link
Contributor

@andrea-williams andrea-williams commented Feb 13, 2025

Card: #2768

How to Test/Run:

  1. Follow the steps listed in bc_obps/common/management/commands/check_migrations_with_prod_data.py (regarding making changes to your local bc_obps/.env file.
  2. You'll also likely want to comment out lines 73-74 and 80-81 in check_migrations_with_prod_data, so that you can retain a copy of the prod data locally while you test.
  3. Sign in to Openshift with the CLI tool
  4. Run poetry run python manage.py check_migrations_with_prod_data --pod <pod_name>, where pod_name is the name of a postgres pod in our Openshift PROD env
  5. Once you've successfully pulled the prod data into your local "obps" database, run poetry run python manage.py migrate registration 0077 and poetry run python manage.py migrate reporting to apply all Django migrations except for the migration included in this PR
  6. Now run poetry run python manage.py migrate registration, which will run the migration included in this PR (registration/0078).

For testing purposes, the migration in this PR contains assertions and print statements for testing purposes and to demonstrate that the migration is working as expected. These assertions and print statements will be deleted from the migration before merging (it's also why the pre-commit hook is failing).

REMEMBER TO DELETE YOUR LOCAL COPY OF THE PROD DATA ONCE YOU'VE FINISHED TESTING!

@andrea-williams andrea-williams force-pushed the task/script-create-contacts-for-existing-users/2768 branch 2 times, most recently from 1c45ca2 to 12b592d Compare February 18, 2025 18:20
@andrea-williams andrea-williams force-pushed the task/script-create-contacts-for-existing-users/2768 branch from 12b592d to 075670f Compare February 18, 2025 23:04
@andrea-williams andrea-williams marked this pull request as ready for review February 18, 2025 23:16
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