Migration 'sentry:0118_create_default_rules' is marked for no-dry-run.
sentry:0119_autoadd_field_projectkey_label
sentry:0120_autoadd_grouprulestatus
sentry:0121_autoadd_unique_grouprulestatus_rule_group
sentry:0122_add_event_group_id_datetime_index
FATAL ERROR - The following SQL query failed: DROP INDEX sentry_message_dc00373b ON sentry_message
The error was: (1091, u"Can't DROP 'sentry_message_dc00373b'; check that column/key exists")
sentry:0123_autoadd_groupassigneeadd_index_event_group_datetime
sentry:0124_auto__add_grouphashadd_unique_grouphash_project_hash
sentry:0125_autoadd_field_user_is_managed
sentry:0126_auto__add_field_option_last_updated
sentry:0127_autoadd_releaseadd_unique_release_project_version
sentry:0128_autoadd_broadcast
sentry:0129_autochg_field_release_idchg_field_pendingteammember_idchgfield
sentry:0130_autodel_field_project_owner
sentry:0131_autoadd_organizationmemberadd_unique_organizationmember_organizati
sentry:0132_add_default_orgs
Migration 'sentry:0132_add_default_orgs' is marked for no-dry-run.
sentry:0133_add_org_members
Migration 'sentry:0133_add_org_members' is marked for no-dry-run.
Migration 'sentry:0369_remove_old_grouphash_last_processed_event_data' is marked for no-dry-run.
Cleaning obsolete data from ...
Done cleaning 0 obsolete entries from .
sentry:0370_correct_groupsnooze_windows
Migration 'sentry:0370_correct_groupsnooze_windows' is marked for no-dry-run.
Migration 'sentry:0417_migrate_identities' is marked for no-dry-run.
Deleting 0 idps with no external_id
0 idps left
0 identities
Deleting 0 bad ids
0 identities left
0 new IDPs and 0 new IDs
sentry:0418_delete_old_idps
Migration 'sentry:0418_delete_old_idps' is marked for no-dry-run.
Migration 'sentry:0425_remove_invalid_github_idps' is marked for no-dry-run.
sentry:0426_autoadd_sentryappinstallation__add_sentryappadd_field_user_is_sent
FATAL ERROR - The following SQL query failed: ALTER TABLE sentry_sentryappinstallation ADD CONSTRAINT authorization_id_refs_id_549dc4aa FOREIGN KEY (authorization_id) REFERENCES sentry_apiauthorization (id);
The error was: (3780, u"Referencing column 'authorization_id' and referenced column 'id' in foreign key constraint 'authorization_id_refs_id_549dc4aa' are incompatible.")
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
! You might be able to recover with: = DROP TABLE sentry_sentryappinstallation CASCADE; []
= DROP TABLE sentry_sentryapp CASCADE; []
no dry run output for delete_foreign_key() due to dynamic DDL, sorry
= ALTER TABLE auth_user DROP COLUMN is_sentry_app CASCADE; []
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS (one that supports DDL transactions)
! NOTE: The error which caused the migration to fail is further up.
Error in migration: sentry:0426_autoadd_sentryappinstallation__add_sentryappadd_field_user_is_sent
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 31, in wrapped
return func(*args, kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 50, in create_default_projects
verbosity=verbosity,
File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 96, in create_default_project
kwargs
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 157, in create
return self.get_queryset().create(*kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 322, in create
obj.save(force_insert=True, using=self.db)
File "/usr/local/lib/python2.7/site-packages/sentry/models/project.py", line 151, in save
super(Project, self).save(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 582, in save_base
update_fields=update_fields, raw=raw, using=using)
File "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send
response = receiver(signal=self, sender=sender, named)
File "/usr/local/lib/python2.7/site-packages/sentry/receivers/savedsearch.py", line 14, in create_default_saved_searches
SavedSearch.objects.create(project=instance, search_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 157, in create
return self.get_queryset().create(kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 322, in create
obj.save(force_insert=True, using=self.db)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 573, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 654, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 687, in _do_insert
using=using, raw=raw)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 232, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1514, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 903, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/init.py", line 446, in execute
return real_execute(self, sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/usr/local/lib/python2.7/site-packages/pymysql/cursors.py", line 163, in execute
result = self._query(query)
File "/usr/local/lib/python2.7/site-packages/pymysql/cursors.py", line 321, in _query
conn.query(q)
File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 505, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 724, in _read_query_result
result.read()
File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 1069, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 676, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python2.7/site-packages/pymysql/protocol.py", line 223, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
OperationalError: (1054, u"Unknown column 'organization_id' in 'field list'")
08:36:25 [ERROR] root: Failed processing signal create_default_projects
Important Details
How are you running Sentry?
On-Premise w/ Docker, version 18.09.0
sentry : 9.1.2-onbuild
Description
docker run -it --rm -e SENTRY_SECRET_KEY=${SECRET_KEY} --link mysql:mysql --link sentry-redis-sql1:redis mysentry upgrade 08:32:37 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured. 08:32:40 [INFO] sentry.plugins.github: apps-not-configured
Unknown config option found: 'slack.legacy-app' Syncing... Creating tables ... Creating table django_admin_log Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table django_content_type Creating table django_session Creating table django_site Creating table south_migrationhistory Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s) Migrating... Running migrations for sentry:
! Since you have a database that does not support running ! schema-altering statements in transactions, we have had ! to leave it in an interim state between migrations.
! You might be able to recover with: = DROP TABLE
sentry_sentryappinstallation
CASCADE; [] = DROP TABLEsentry_sentryapp
CASCADE; []no dry run output for delete_foreign_key() due to dynamic DDL, sorry = ALTER TABLE
auth_user
DROP COLUMNis_sentry_app
CASCADE; []! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS (one that supports DDL transactions) ! NOTE: The error which caused the migration to fail is further up. Error in migration: sentry:0426_autoadd_sentryappinstallation__add_sentryappadd_field_user_is_sent Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 31, in wrapped return func(*args, kwargs) File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 50, in create_default_projects verbosity=verbosity, File "/usr/local/lib/python2.7/site-packages/sentry/receivers/core.py", line 96, in create_default_project kwargs File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 157, in create return self.get_queryset().create(*kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 322, in create obj.save(force_insert=True, using=self.db) File "/usr/local/lib/python2.7/site-packages/sentry/models/project.py", line 151, in save super(Project, self).save(args, kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 545, in save force_update=force_update, update_fields=update_fields) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 582, in save_base update_fields=update_fields, raw=raw, using=using) File "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send response = receiver(signal=self, sender=sender, named) File "/usr/local/lib/python2.7/site-packages/sentry/receivers/savedsearch.py", line 14, in create_default_saved_searches SavedSearch.objects.create(project=instance, search_kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 157, in create return self.get_queryset().create(kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 322, in create obj.save(force_insert=True, using=self.db) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 545, in save force_update=force_update, update_fields=update_fields) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 573, in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 654, in _save_table result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 687, in _do_insert using=using, raw=raw) File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 232, in _insert return insert_query(self.model, objs, fields, **kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1514, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 903, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/init.py", line 446, in execute return real_execute(self, sql, params) File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute return self.cursor.execute(query, args) File "/usr/local/lib/python2.7/site-packages/pymysql/cursors.py", line 163, in execute result = self._query(query) File "/usr/local/lib/python2.7/site-packages/pymysql/cursors.py", line 321, in _query conn.query(q) File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 505, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 724, in _read_query_result result.read() File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 1069, in read first_packet = self.connection._read_packet() File "/usr/local/lib/python2.7/site-packages/pymysql/connections.py", line 676, in _read_packet packet.raise_for_error() File "/usr/local/lib/python2.7/site-packages/pymysql/protocol.py", line 223, in raise_for_error err.raise_mysql_exception(self._data) File "/usr/local/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception raise errorclass(errno, errval) OperationalError: (1054, u"Unknown column 'organization_id' in 'field list'") 08:36:25 [ERROR] root: Failed processing signal create_default_projects
Steps to Reproduce
执行docker run -it --rm mysentry upgrade