From c17202b92ea6033c62d42cdda5e47b82056063a7 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Mojtahedi Date: Thu, 12 Aug 2021 16:02:41 +0430 Subject: [PATCH 1/2] add vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 264c9d26..abf202ec 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ fcm_django.egg-info # IDE .idea *.iml +.vscode # virtualenv .env From 6661ca8221d7b92a5506ceafe3234f48ffcd9695 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Mojtahedi Date: Thu, 12 Aug 2021 16:08:43 +0430 Subject: [PATCH 2/2] Amend charfield's max_length to safe number of 255 --- fcm_django/migrations/0006_auto_20210802_1140.py | 2 +- fcm_django/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fcm_django/migrations/0006_auto_20210802_1140.py b/fcm_django/migrations/0006_auto_20210802_1140.py index 43e68ef3..ba420486 100644 --- a/fcm_django/migrations/0006_auto_20210802_1140.py +++ b/fcm_django/migrations/0006_auto_20210802_1140.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): blank=True, db_index=True, help_text="Unique device identifier", - max_length=3072, + max_length=255, null=True, verbose_name="Device ID", ), diff --git a/fcm_django/models.py b/fcm_django/models.py index 77c7f171..ab924ad5 100644 --- a/fcm_django/models.py +++ b/fcm_django/models.py @@ -262,7 +262,7 @@ class AbstractFCMDevice(Device): null=True, db_index=True, help_text=_("Unique device identifier"), - max_length=3072, + max_length=255, ) registration_id = models.TextField(verbose_name=_("Registration token")) type = models.CharField(choices=DEVICE_TYPES, max_length=10)