Skip to content

chore(south) Update south state to use new jsonfield #13466

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

Merged
merged 1 commit into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/sentry/db/models/fields/jsonfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ def value_to_string(self, obj):

if 'south' in settings.INSTALLED_APPS:
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ['^sentry\.db\.models\.fields\.JSONField'])
add_introspection_rules([], ['^sentry\.db\.models\.fields\.jsonfield.JSONField'])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

south is very picky about the module path and won't accept aliases.

3 changes: 1 addition & 2 deletions src/sentry/models/debugfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
import logging
import tempfile

from jsonfield import JSONField
from django.db import models

from symbolic import Archive, SymbolicError, ObjectErrorUnsupportedObject

from sentry import options
from sentry.cache import default_cache
from sentry.constants import KNOWN_DIF_FORMATS
from sentry.db.models import FlexibleForeignKey, Model, sane_repr, BaseManager
from sentry.db.models import FlexibleForeignKey, Model, sane_repr, BaseManager, JSONField
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this last time.

from sentry.models.file import File
from sentry.reprocessing import resolve_processing_issue, \
bump_reprocessing_revision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Migration(SchemaMigration):
def forwards(self, orm):

# Changing field 'AuthProvider.config'
db.alter_column('sentry_authprovider', 'config', self.gf('jsonfield.fields.JSONField')())
db.alter_column('sentry_authprovider', 'config', self.gf('sentry.db.models.fields.jsonfield.JSONField')())

def backwards(self, orm):

Expand Down Expand Up @@ -296,7 +296,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Migration(SchemaMigration):
def forwards(self, orm):

# Changing field 'AuthIdentity.data'
db.alter_column('sentry_authidentity', 'data', self.gf('jsonfield.fields.JSONField')())
db.alter_column('sentry_authidentity', 'data', self.gf('sentry.db.models.fields.jsonfield.JSONField')())

def backwards(self, orm):

Expand Down Expand Up @@ -270,7 +270,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -298,7 +298,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -302,7 +302,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def forwards(self, orm):
db.add_column(
'sentry_file',
'headers',
self.gf('jsonfield.fields.JSONField')(default={}),
self.gf('sentry.db.models.fields.jsonfield.JSONField')(default={}),
keep_default=False
)

# Changing field 'File.storage_options'
db.alter_column('sentry_file', 'storage_options', self.gf('jsonfield.fields.JSONField')())
db.alter_column('sentry_file', 'storage_options', self.gf('sentry.db.models.fields.jsonfield.JSONField')())

# Changing field 'File.checksum'
db.alter_column(
Expand Down Expand Up @@ -325,7 +325,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -357,7 +357,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -537,7 +537,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -559,7 +559,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -297,7 +297,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -476,7 +476,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -498,7 +498,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -307,7 +307,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -486,7 +486,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -508,7 +508,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -307,7 +307,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -489,7 +489,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -511,7 +511,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
8 changes: 4 additions & 4 deletions src/sentry/south_migrations/0168_unfill_projectkey_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -303,7 +303,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -485,7 +485,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -507,7 +507,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -309,7 +309,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -491,7 +491,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -513,7 +513,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -348,7 +348,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -530,7 +530,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -552,7 +552,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def backwards(self, orm):
'to': "orm['sentry.AuthProvider']"
}
),
'data': ('jsonfield.fields.JSONField', [], {
'data': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -309,7 +309,7 @@ def backwards(self, orm):
'Meta': {
'object_name': 'AuthProvider'
},
'config': ('jsonfield.fields.JSONField', [], {
'config': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'date_added':
Expand Down Expand Up @@ -491,7 +491,7 @@ def backwards(self, orm):
'max_length': '40',
'null': 'True'
}),
'headers': ('jsonfield.fields.JSONField', [], {
'headers': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'id':
Expand All @@ -513,7 +513,7 @@ def backwards(self, orm):
'max_length': '128',
'null': 'True'
}),
'storage_options': ('jsonfield.fields.JSONField', [], {
'storage_options': ('sentry.db.models.fields.jsonfield.JSONField', [], {
'default': '{}'
}),
'timestamp': (
Expand Down
Loading