Files
zulip/zerver/migrations/0507_rework_realm_upload_quota_gb.py
Mateusz Mandera 8038e2322c realm: Change implementation approach for upload_quota_gb.
Most importantly, fixes a bug where a realm with a custom
.upload_quota_gb value (set by changing it in the database via e.g.
manage.py shell) would end up having it lowered while upgrading their
plan via the do_change_realm_plan_type function, which used to just set
it to the value implied by the new plan without caring about whether
that isn't lower than the original limit.

The new approach is cleaner since we don't do db queries by
upload_quota_gb so it's nicer to just generate these dynamically, making
changes to our limit-per-plan rules much easier - skipping the need for
migrations.
2024-04-15 15:08:56 -07:00

22 lines
516 B
Python

# Generated by Django 4.2.10 on 2024-03-10 04:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0506_realm_require_unique_names"),
]
operations = [
migrations.RemoveField(
model_name="realm",
name="upload_quota_gb",
),
migrations.AddField(
model_name="realm",
name="custom_upload_quota_gb",
field=models.IntegerField(null=True),
),
]