reverse a django migration
# You need to identify the last migration to which you want
# to reverse and use it as the migration target
python manage.py migrate my_app_name target_migration
reverse a django migration
# You need to identify the last migration to which you want
# to reverse and use it as the migration target
python manage.py migrate my_app_name target_migration
purpose of migration folder in django
migrations in django
Migration is a way of applying changes that we have made to a model, into the database schema.
Django creates a migration file inside the migration folder for each model to create the table schema,
and each table is mapped to the model of which migration is created.
makemigrations : It is used to create a migration file that contains code for the tabled schema of a model.
migrate : It creates table according to the schema defined in the migration file.
Migration files are the history of your database.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us