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

Deletion of stale content types raises ProgrammingError #57

Open
intellisense opened this issue Nov 18, 2015 · 1 comment
Open

Deletion of stale content types raises ProgrammingError #57

intellisense opened this issue Nov 18, 2015 · 1 comment
Labels

Comments

@intellisense
Copy link

When there are stale content types to be deleted I am getting bellow error. I am not able to proceed with yes option. Any help? Thanks!

(venv) F:\Freelancer\company\project>fab manage:migrate,notifications
[localhost] local: python manage.py migrate notifications
Operations to perform:
  Apply all migrations: notifications
Running migrations:
  No migrations to apply.
The following content types are stale and need to be deleted:

    lp_settings | shortnotifications
    lp_settings | notification

Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.

    Type 'yes' to continue, or 'no' to cancel: yes
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\commands\migrate.py", line 165, in handle
    emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\core\management\sql.py", line 268, in emit_post_migrate_signal
    using=db)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\dispatch\dispatcher.py", line 198, in send
    response = receiver(signal=self, sender=sender, **named)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\contrib\contenttypes\management.py", line 84, in update_contenttypes
    ct.delete()
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\models\base.py", line 739, in delete
    collector.delete()
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\models\deletion.py", line 262, in delete
    qs._raw_delete(using=self.using)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\models\query.py", line 569, in _raw_delete
    sql.DeleteQuery(self.model).delete_qs(self, using)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\models\sql\subqueries.py", line 85, in delete_qs
    self.get_compiler(using).execute_sql(NO_RESULTS)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\models\sql\compiler.py", line 787, in execute_sql
    cursor.execute(sql, params)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\backends\utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\backends\utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "F:\Freelancer\company\project\venv\lib\site-packages\django\db\backends\utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column notifications_noticesetting.scoping_content_type_id does not exist
LINE 1: DELETE FROM "notifications_noticesetting" WHERE "notificatio...
                                                        ^
@intellisense
Copy link
Author

What is the proper way to upgrade from this commit to 3.0.0??

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

No branches or pull requests

2 participants