Home > Blockchain >  model doesn't have migrations
model doesn't have migrations

Time:10-14

I am working on the Django model. I migrate all the files of the app, but it is showing me the model doesn't have migrations and also no migration file in the folder, but init.py file exists in the folder. Please give me suggestions.

admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[X] 0003_logentry_add_action_flag_choices
 auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
   [X] 0005_alter_user_last_login_null
 [X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
[X] 0010_alter_group_name_max_length
[X] 0011_update_proxy_permissions
[X] 0012_alter_user_first_name_max_length
 contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
sessions
 [X] 0001_initial

CodePudding user response:

First delete your all migrations folder and try below command:

python manage.py makemigrations appname

python manage.py sqlmigrate appname 0001  #This value will generate after makemigrations

python manage.py migrate
  • Related