# Prepare migration using the latest model definitions
python manage.py makemigrations [app_name]
# Apply migrations for specified app using specified database connection (in settings.py)
python manage.py migrate [app_name] --database [database_name]
#record latest model before migration
python3 manage.py makemigrations [app_name]
#migrate to database
python3 manage.py migrate
# configure your database first before migrating default database will be sqlite3
# Generated by Django 2.2.5 on 2019-09-25 06:00
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name ='GeeksModel',
fields =[
('id', models.AutoField(auto_created = True,
primary_key = True, serialize = False,
verbose_name ='ID')),], ),
]