Answer the question
In order to leave comments, you need to log in
Error creating migration in PostgreSQL database. What is the problem?
When migrating to PostgreSQL, it writes such an error. Everything is fine in sqlite.
Rendering model states...Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 221, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 104, in migrate
state = migration.mutate_state(state, preserve=do_run)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 83, in mutate_state
operation.state_forwards(self.app_label, new_state)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 110, in state_forwards
state.remove_model(app_label, self.name_lower)
File "/var/www/pjreo74/env/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 84, in remove_model
del self.models[app_label, model_name]
KeyError: ('houses', u'typelift')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question