diff --git a/events/migrations/0001_initial.py b/events/migrations/0001_initial.py index 23a2a28..086b3b0 100644 --- a/events/migrations/0001_initial.py +++ b/events/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): ('event_id', models.UUIDField(editable=False, help_text='As per the sent data')), ('data', models.TextField()), ('timestamp', models.DateTimeField(db_index=True)), - ('platform', models.CharField(choices=[('as3', 'As3'), ('c', 'C'), ('cfml', 'Cfml'), ('cocoa', 'Cocoa'), ('csharp', 'Csharp'), ('elixir', 'Elixir'), ('haskell', 'Haskell'), ('go', 'Go'), ('groovy', 'Groovy'), ('java', 'Java'), ('javascript', 'Javascript'), ('native', 'Native'), ('node', 'Node'), ('objc', 'Objc'), ('other', 'Other'), ('perl', 'Perl'), ('php', 'Php'), ('python', 'Python'), ('ruby', 'Ruby')], max_length=64)), + ('platform', models.CharField(max_length=64)), ('level', models.CharField(blank=True, choices=[('fatal', 'Fatal'), ('error', 'Error'), ('warning', 'Warning'), ('info', 'Info'), ('debug', 'Debug')], max_length=7)), ('logger', models.CharField(blank=True, default='', max_length=64)), ('transaction', models.CharField(blank=True, default='', max_length=200)), diff --git a/events/models.py b/events/models.py index 359d697..011971d 100644 --- a/events/models.py +++ b/events/models.py @@ -18,28 +18,6 @@ from .storage_registry import get_write_storage, get_storage from .tasks import delete_event_deps -class Platform(models.TextChoices): - AS3 = "as3" - C = "c" - CFML = "cfml" - COCOA = "cocoa" - CSHARP = "csharp" - ELIXIR = "elixir" - HASKELL = "haskell" - GO = "go" - GROOVY = "groovy" - JAVA = "java" - JAVASCRIPT = "javascript" - NATIVE = "native" - NODE = "node" - OBJC = "objc" - OTHER = "other" - PERL = "perl" - PHP = "php" - PYTHON = "python" - RUBY = "ruby" - - class Level(models.TextChoices): FATAL = "fatal" ERROR = "error" @@ -93,8 +71,10 @@ class Event(models.Model): # > a numeric (integer or float) value representing the number of seconds that have elapsed since the Unix epoch. timestamp = models.DateTimeField(db_index=True, blank=False, null=False) - # > A string representing the platform the SDK is submitting from. [..] Acceptable values are [as defined below] - platform = models.CharField(max_length=64, blank=False, null=False, choices=Platform.choices) + # > A string representing the platform the SDK is submitting from. [..] + # (the list of supported platforms is ~700 items long, and since we don't actually depend on this value to be any + # item from that list, we don't force it to be one of them) + platform = models.CharField(max_length=64, blank=False, null=False) # > ### Optional Attributes