Django Migrations: Turning Models Into Database Tables



This content originally appeared on DEV Community and was authored by Joe ???????

Django migrations take your Python models and create real database tables.

1. Create Migrations

Run:

python manage.py makemigrations tracker

2. Apply Migrations

Run:

python manage.py migrate

3. What Just Happened?

  • The Category and Transaction tables are now in your database!
  • Django tracks changes for future updates.

Next: manage your data easily with Django admin.


This content originally appeared on DEV Community and was authored by Joe ???????