mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
This makes this value much easier for a server admin to change than it was when embedded directly in the code. (Note this entire mechanism already only applies on a server open for anyone to create a realm.) Doing this also means getting the default out of the database. Instead, we make the column nullable, and when it's NULL in the database, treat that as whatever the current default is. This better matches anyway the likely model where there are a few realms with specially-set values, and everything else should be treated uniformly. The migration contains a `RenameField` step, which sounds scary operationally -- but it really does mean just the *field*, in the model within the Python code. The underlying column's name doesn't change.
26 lines
649 B
Python
26 lines
649 B
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.6 on 2018-02-10 02:59
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('zerver', '0147_realm_disallow_disposable_email_addresses'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='realm',
|
|
name='max_invites',
|
|
field=models.IntegerField(null=True, db_column='max_invites'),
|
|
),
|
|
migrations.RenameField(
|
|
model_name='realm',
|
|
old_name='max_invites',
|
|
new_name='_max_invites',
|
|
),
|
|
]
|