From 3b5c7e0dd362b7ef2c470daa5ba2b6bc57d678ae Mon Sep 17 00:00:00 2001 From: Sverre Nystad Date: Sat, 6 Jan 2024 14:43:53 +0100 Subject: [PATCH] Docs: Add instructions for making changes to models in README --- backend/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/README.md b/backend/README.md index f81ef492..c68bae9d 100644 --- a/backend/README.md +++ b/backend/README.md @@ -65,6 +65,16 @@ http://127.0.0.1:8000/admin/ Enjoy! +## When making changes to the models + +When making changes to the models, you need to create a migration file and migrate the database. + +```bash +docker-compose run tutorai python manage.py makemigrations +docker-compose run tutorai python manage.py migrate +``` + + ## How to create a new application in the backend To create a new application This command creates a new directory named "api" within your "backend" directory, along with the basic files needed for a Django app.