From acc114772ffc7724030e68c94d651938f8d26951 Mon Sep 17 00:00:00 2001 From: rikuke <33894149+rikuke@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:14:09 +0200 Subject: [PATCH] feat: add AD username column to user (#2499) --- .../users/migrations/0002_user_ad_username.py | 18 ++++++++++++++++++ backend/benefit/users/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 backend/benefit/users/migrations/0002_user_ad_username.py diff --git a/backend/benefit/users/migrations/0002_user_ad_username.py b/backend/benefit/users/migrations/0002_user_ad_username.py new file mode 100644 index 0000000000..d174725f2a --- /dev/null +++ b/backend/benefit/users/migrations/0002_user_ad_username.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.18 on 2023-11-20 12:34 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='ad_username', + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/backend/benefit/users/models.py b/backend/benefit/users/models.py index 1a8d18978a..2e7860e49b 100644 --- a/backend/benefit/users/models.py +++ b/backend/benefit/users/models.py @@ -13,6 +13,7 @@ def format_date(date: datetime) -> Optional[str]: class User(AbstractUser, SerializableMixin): id = models.UUIDField(primary_key=True, default=uuid4, editable=False) + ad_username = models.CharField(max_length=255, null=True, blank=True) class Meta: db_table = "bf_users_user"