Hello,
I’ve been meaning to use the Django’s data migration feature, and the example command ( url ) :
python manage.py makemigrations --empty yourappname
I’ve replaced the yourappname with the correct app name I have registered, but then this error is raised :
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/base.py", line 98, in wrapped
res = handle_func(*args, **kwargs)
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 181, in handle
changes = {app: [Migration("custom", app)] for app in app_labels}
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 181, in <dictcomp>
changes = {app: [Migration("custom", app)] for app in app_labels}
File "/home/benja/Documents/GitHub/tn_web/venv/lib/python3.8/site-packages/django/db/migrations/migration.py", line 57, in __init__
self.operations = list(self.__class__.operations)
AttributeError: type object 'Migration' has no attribute 'operations'
It seems to be a bug ? Did I do something wrong here ?