Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration fails for Django 3.2 to KeyError 'include' #116

Open
mikko-ahonen opened this issue May 6, 2021 · 1 comment
Open

Migration fails for Django 3.2 to KeyError 'include' #116

mikko-ahonen opened this issue May 6, 2021 · 1 comment

Comments

@mikko-ahonen
Copy link

---> Migrating database ...
/usr/local/lib/python3.7/site-packages/environ/environ.py:630: UserWarning: /app/productregister/.env doesn't exist - if you're not configuring your environment separately, create one.
"environment separately, create one." % env_file)
Operations to perform:
Apply all migrations: accounts, admin, auth, contenttypes, product, reversion, sessions
Running migrations:
Applying contenttypes.0001_initial...Traceback (most recent call last):
File "./manage.py", line 22, in
main()
File "./manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 246, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python3.7/site-packages/django/db/migrations/migration.py", line 126, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python3.7/site-packages/django/db/migrations/operations/models.py", line 531, in database_forwards
getattr(new_model._meta, self.option_name, set()),
File "/usr/local/lib/python3.7/site-packages/sql_server/pyodbc/schema.py", line 156, in alter_unique_together
self.execute(sql)
File "/usr/local/lib/python3.7/site-packages/sql_server/pyodbc/schema.py", line 861, in execute
sql = str(sql)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/ddl_references.py", line 201, in str
return self.template % self.parts
KeyError: 'include'

@sanderkollerie
Copy link

I have the same problem. Any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants