22 lines
530 B
Python
22 lines
530 B
Python
from django.db import migrations
|
|
|
|
|
|
def convert_ai_analyzed_to_activated(apps, schema_editor):
|
|
Appreciation = apps.get_model("appreciation", "Appreciation")
|
|
Appreciation.objects.filter(status="ai_analyzed").update(status="activated")
|
|
|
|
|
|
def reverse_conversion(apps, schema_editor):
|
|
pass
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("appreciation", "0007_add_reminder_fields"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(convert_ai_analyzed_to_activated, reverse_conversion),
|
|
]
|