Manage migrations
- 05 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Manage migrations
- Updated on 05 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
The following procedure explains how to create a new data model in your module.
Edit the
models.py
file.# example/models.py from django.db import models class QRCode(models.Model): text = models.CharField(max_length=100)
Install your module.
cb add django-example
Generate the migrations.
cd backend pipenv shell python manage.py makemigrations
Save the newly generated migration files in your module.
cb commit django-example
You now have the migration files for your module that live inside your module's Django app.
Was this article helpful?