From 15cf0b9aa43b5d71643acb847eb7ea4f79d8ee2a Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Mon, 7 Oct 2024 10:36:12 -0400 Subject: [PATCH 1/2] chore: Add index to the username field of DSC --- ...sharingconsent_consent_add_username_index.py | 17 +++++++++++++++++ consent/models.py | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 consent/migrations/0007_datasharingconsent_consent_add_username_index.py diff --git a/consent/migrations/0007_datasharingconsent_consent_add_username_index.py b/consent/migrations/0007_datasharingconsent_consent_add_username_index.py new file mode 100644 index 0000000000..b20ca0172e --- /dev/null +++ b/consent/migrations/0007_datasharingconsent_consent_add_username_index.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-10-07 14:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('consent', '0006_alter_historicaldatasharingconsent_options'), + ] + + operations = [ + migrations.AddIndex( + model_name='datasharingconsent', + index=models.Index(fields=['username'], name='consent_dat_usernam_fae23a_idx'), + ), + ] diff --git a/consent/models.py b/consent/models.py index abbbd2a72e..ea230da629 100644 --- a/consent/models.py +++ b/consent/models.py @@ -195,6 +195,9 @@ class Meta: abstract = True app_label = 'consent' + indexes = [ + models.Index(fields=['username']) + ] enterprise_customer = models.ForeignKey( EnterpriseCustomer, From b486bf559bdb24e88b85bbfa1211b0702d818a1a Mon Sep 17 00:00:00 2001 From: Brian Beggs Date: Mon, 7 Oct 2024 10:38:19 -0400 Subject: [PATCH 2/2] chore: Bump edx-enterprise version to 4.27 --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9a3194b0e8..14e8ca5204 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.27.0] +--------- +* chore: Add index to the username field in the `Consent` model + [4.26.1] --------- * feat: proxy login now redirects to LMS register page instead of login page diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 842d82f811..b15308fbf4 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.26.1" +__version__ = "4.27.0"