diff --git a/commcare_connect/opportunity/migrations/0027_alter_commcareapp_cc_app_id.py b/commcare_connect/opportunity/migrations/0027_alter_commcareapp_cc_app_id.py new file mode 100644 index 00000000..680d9feb --- /dev/null +++ b/commcare_connect/opportunity/migrations/0027_alter_commcareapp_cc_app_id.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.5 on 2023-11-22 21:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("opportunity", "0026_create_send_inactive_notification_periodic_task"), + ] + + operations = [ + migrations.AlterField( + model_name="commcareapp", + name="cc_app_id", + field=models.CharField(max_length=50, unique=True), + ), + ] diff --git a/commcare_connect/opportunity/models.py b/commcare_connect/opportunity/models.py index 6e6b3874..40dac7ac 100644 --- a/commcare_connect/opportunity/models.py +++ b/commcare_connect/opportunity/models.py @@ -18,7 +18,7 @@ class CommCareApp(BaseModel): related_query_name="app", ) cc_domain = models.CharField(max_length=255) - cc_app_id = models.CharField(max_length=50) + cc_app_id = models.CharField(max_length=50, unique=True) name = models.CharField(max_length=255) description = models.TextField() passing_score = models.IntegerField(null=True)