forked from rapidpro/rapidpro
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into allauth-progress
- Loading branch information
Showing
16 changed files
with
231 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
temba/campaigns/migrations/0067_campaignevent_fire_uuid_campaignevent_status.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 5.1.4 on 2025-02-28 15:24 | ||
|
||
from django.db import migrations, models | ||
|
||
import temba.utils.uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("campaigns", "0066_alter_campaignevent_message"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="campaignevent", | ||
name="fire_uuid", | ||
field=models.UUIDField(null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="campaignevent", | ||
name="fire_uuid", | ||
field=models.UUIDField(default=temba.utils.uuid.uuid4, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="campaignevent", | ||
name="status", | ||
field=models.CharField(choices=[("S", "Scheduling"), ("R", "Ready")], default="R", max_length=1), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
temba/campaigns/migrations/0068_backfill_event_fire_uuid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.1.4 on 2025-02-28 20:53 | ||
|
||
from django.db import migrations | ||
|
||
from temba.utils.uuid import uuid4 | ||
|
||
|
||
def backfill_event_fire_uuid(apps, schema_editor): # pragma: no cover | ||
CampaignEvent = apps.get_model("campaigns", "CampaignEvent") | ||
|
||
for event in CampaignEvent.objects.filter(fire_uuid=None).only("id"): | ||
event.fire_uuid = uuid4() | ||
event.save(update_fields=("fire_uuid",)) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("campaigns", "0067_campaignevent_fire_uuid_campaignevent_status"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(backfill_event_fire_uuid, migrations.RunPython.noop), | ||
] |
20 changes: 20 additions & 0 deletions
20
temba/campaigns/migrations/0069_alter_campaignevent_fire_uuid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 5.1.4 on 2025-02-28 20:55 | ||
|
||
from django.db import migrations, models | ||
|
||
import temba.utils.uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("campaigns", "0068_backfill_event_fire_uuid"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="campaignevent", | ||
name="fire_uuid", | ||
field=models.UUIDField(default=temba.utils.uuid.uuid4), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.