From 6b637428a71deef586cb2605826c045bcaff181d Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Mon, 19 Nov 2018 20:44:11 -0800 Subject: [PATCH] billing: Add Realm.seat_limit. Currently unenforced, and will mostly need to be set by hand. --- zerver/migrations/0191_realm_seat_limit.py | 20 ++++++++++++++++++++ zerver/models.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 zerver/migrations/0191_realm_seat_limit.py diff --git a/zerver/migrations/0191_realm_seat_limit.py b/zerver/migrations/0191_realm_seat_limit.py new file mode 100644 index 0000000000..7e3e418620 --- /dev/null +++ b/zerver/migrations/0191_realm_seat_limit.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.16 on 2018-11-20 04:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('zerver', '0190_cleanup_pushdevicetoken'), + ] + + operations = [ + migrations.AddField( + model_name='realm', + name='seat_limit', + field=models.PositiveIntegerField(null=True), + ), + ] diff --git a/zerver/models.py b/zerver/models.py index cbf2c11208..d439e750ea 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -291,6 +291,7 @@ class Realm(models.Model): ] has_seat_based_plan = models.BooleanField(default=False) # type: bool + seat_limit = models.PositiveIntegerField(null=True) # type: Optional[int] def authentication_methods_dict(self) -> Dict[str, bool]: """Returns the a mapping from authentication flags to their status,