23 lines
604 B
Python
23 lines
604 B
Python
# Generated by Django 3.2.20 on 2023-12-07 14:01
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def add_field_to_json(apps, _schema_editor):
|
|
FeedbackResponse = apps.get_model("feedback", "FeedbackResponse")
|
|
for instance in FeedbackResponse.objects.all():
|
|
if instance.data is None:
|
|
instance.data = {}
|
|
instance.data["feedback_type"] = "uk" # Set the default value
|
|
instance.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("feedback", "0006_auto_20230922_1131"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(add_field_to_json),
|
|
]
|