From 237195e20e296e851c41219a7af7222266937d44 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 19 Nov 2023 14:22:24 -0800 Subject: [PATCH] Make all name-related fields nullable within the GoogleUser --- ...9_alter_googleuser_family_name_and_more.py | 27 +++++++++++++++++++ src/database/models/__init__.py | 6 ++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 src/database/migrations/0019_alter_googleuser_family_name_and_more.py diff --git a/src/database/migrations/0019_alter_googleuser_family_name_and_more.py b/src/database/migrations/0019_alter_googleuser_family_name_and_more.py new file mode 100644 index 00000000..bb31adcb --- /dev/null +++ b/src/database/migrations/0019_alter_googleuser_family_name_and_more.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.7 on 2023-11-19 22:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("database", "0018_searchmodelconfig_delete_searchmodel"), + ] + + operations = [ + migrations.AlterField( + model_name="googleuser", + name="family_name", + field=models.CharField(blank=True, default=None, max_length=200, null=True), + ), + migrations.AlterField( + model_name="googleuser", + name="given_name", + field=models.CharField(blank=True, default=None, max_length=200, null=True), + ), + migrations.AlterField( + model_name="googleuser", + name="name", + field=models.CharField(blank=True, default=None, max_length=200, null=True), + ), + ] diff --git a/src/database/models/__init__.py b/src/database/models/__init__.py index 92848e5c..92da3e6e 100644 --- a/src/database/models/__init__.py +++ b/src/database/models/__init__.py @@ -27,9 +27,9 @@ class GoogleUser(models.Model): sub = models.CharField(max_length=200) azp = models.CharField(max_length=200) email = models.CharField(max_length=200) - name = models.CharField(max_length=200) - given_name = models.CharField(max_length=200) - family_name = models.CharField(max_length=200) + name = models.CharField(max_length=200, null=True, default=None, blank=True) + given_name = models.CharField(max_length=200, null=True, default=None, blank=True) + family_name = models.CharField(max_length=200, null=True, default=None, blank=True) picture = models.CharField(max_length=200, null=True, default=None) locale = models.CharField(max_length=200)