Ошибка при создании миграции в базе данных PostgresSQL. В чём проблема?

При миграции в PostgresSQL пишет такую ошибку. В 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')
  • Вопрос задан
  • 225 просмотров
Решения вопроса 1
drupa
@drupa Автор вопроса
Пересоздал все миграции, всё встало.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы