realm: Add uuid and associated secret columns.

Thisi and the following commit follow the approach used in
3e2ad84bbe.

First migration requires a server restart - after that any new realms
will be created with the columns set.

The following migrations are in the next commit:

Second migration does a backfill for older realms and can run in the
background while the server is operating normally.

Third migration enforces null=False now that all realms have the columns
set.
This commit is contained in:
Mateusz Mandera
2023-10-12 20:10:07 +02:00
committed by Tim Abbott
parent 23f53752b2
commit 3afe585922
3 changed files with 61 additions and 12 deletions

View File

@@ -0,0 +1,22 @@
# Generated by Django 4.2.5 on 2023-10-06 09:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0478_realm_enable_guest_user_indicator"),
]
operations = [
migrations.AddField(
model_name="realm",
name="uuid",
field=models.UUIDField(null=True, unique=True),
),
migrations.AddField(
model_name="realm",
name="uuid_owner_secret",
field=models.TextField(null=True),
),
]