preregistration: Add field to track import progress.

We add a field to track user's progress and other details
during the import process.
This commit is contained in:
Aman Agrawal 2024-11-09 10:26:27 +05:30
parent 65f05794ee
commit b4db5e50c8
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Generated by Django 5.0.9 on 2024-11-21 02:32
import django.core.serializers.json
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0628_remove_realm_invite_to_realm_policy"),
]
operations = [
migrations.AddField(
model_name="preregistrationrealm",
name="data_import_metadata",
field=models.JSONField(
default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder
),
),
]

View File

@ -1,4 +1,5 @@
from django.contrib.contenttypes.fields import GenericRelation
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.db.models import CASCADE, Q, QuerySet
from django.db.models.functions import Upper
@ -49,6 +50,8 @@ class PreregistrationRealm(models.Model):
UserProfile, null=True, related_name="+", on_delete=models.SET_NULL
)
data_import_metadata = models.JSONField(default=dict, encoder=DjangoJSONEncoder)
class PreregistrationUser(models.Model):
# Data on a partially created user, before the completion of