Skip to content

Commit

Permalink
enforce unique apps
Browse files Browse the repository at this point in the history
  • Loading branch information
calellowitz committed Nov 22, 2023
1 parent 108ef00 commit 796e2f4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 1 addition & 1 deletion commcare_connect/opportunity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 796e2f4

Please sign in to comment.