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

Obsolete: Initial data migration 36 #223

Closed

Conversation

ethanstrominger
Copy link
Member

@ethanstrominger ethanstrominger commented Nov 6, 2023

Fixes #36

What changes did you make?

Fang - This branch is based on your branch with main merged in. Since I merged main so it is hard to compare to your branch. However, new files should be obvious. I changed convert.py so you will need to compare to yours. I also updated data guide but I want to make additonal changes if you are good with the changes I have made.

Also, somehow add-model-api-and-endpoints got conflicts which were committed. Can you fix those?

I can checkout CONTRIBUTING.md conflicts. I would like to merge this even if not perfect as long as it does not break anything that is currently working so we don't have to worry about merge conflicts.

app/scripts/convert.py Outdated Show resolved Hide resolved
[pd-data-spreadsheet]: https://docs.google.com/spreadsheets/d/1x_zZ8JLS2hO-zG0jUocOJmX16jh-DF5dccrd_OEGNZ0/
[apps-script]: https://thenewstack.io/how-to-convert-google-spreadsheet-to-json-formatted-text/#:~:text=To%20do%20this,%20click%20Extensions,save%20your%20work%20so%20far.

## Call Script From Migration
Copy link
Member

Choose a reason for hiding this comment

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

Wasn't able to get this working.

Ran python manage.py migrate inside the docker container but it did not populate any information into the db

Copy link
Member

@fyliu fyliu Dec 4, 2023

Choose a reason for hiding this comment

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

@alexlaw528 It might have already been added to the db. Maybe try python manage.py migrate data 0001 to see if it rolls back the data. I'm not sure how to roll back past that.

app/scripts/convert.py Outdated Show resolved Hide resolved
Copy link
Member

@alexlaw528 alexlaw528 left a comment

Choose a reason for hiding this comment

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

Core functionality works! I was able to populate our seed data.

Some minor cleanup requests and clarification around the seed populating through the migration.

fyliu added 4 commits December 4, 2023 14:19
- removed commented out prints
- improved create data with a loop
- fixed docs to say 9 rows in table
@ethanstrominger ethanstrominger changed the title Initial data migration 36 Obsolete: Initial data migration 36 Dec 5, 2023
@ethanstrominger ethanstrominger deleted the initial-data-migration-36 branch July 2, 2024 15:21
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.

Document how to create initial data for tables
3 participants