codebuddies / backend

CodeBuddies back-end
https://codebuddies.org
GNU General Public License v3.0
20 stars 25 forks source link

[Documentation] Document guidance for when to run makemigration and --build commands #155

Closed lpatmo closed 3 years ago

lpatmo commented 4 years ago

Context

See: Background: #70

Acceptance Criteria

[ ] Add the following to the README to document when makemigrations commands should be run.

Draft text:

Whenever a model change happens, developers should run `docker-compose run --rm app python ./manage.py makemigrations` and `docker-compose run --rm app python ./manage.py migrate`. 

A PR reviewer should see the associated migration files in the PR diff when there is a model change.

[ ] Add to the README some guidance for contributors to ensure they are running makemigrations at an appropriate point.

From @BethanyG in #70 :

makemigrations should be run only by someone who has made a model (db) change.

If they've made

PK changes
removals
fieldname changes
multiple sets of changes with reversions
datatype changes
They should be double checking their migration files and consolidating, organizing, and deleting excess where necessary.

Only the migration files that make the final intended changes should be checked in (e.g. the final field name in its migration, the final PK change in its migration)- intermediary back and forth files can create confusion and mess.
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

BethanyG commented 3 years ago

@lpatmo Do we still need this, or is it OK to close??

lpatmo commented 3 years ago

Marked this as a Hacktoberfest issue, since it is a pretty easy PR to add some documentation to the README.

lpatmo commented 3 years ago

Included these changes in https://github.com/codebuddies/backend/pull/195!