2017-09-25 09:47:15 +02:00
|
|
|
# Generated by Django 1.11.6 on 2017-10-30 05:05
|
|
|
|
|
2017-11-16 00:44:00 +01:00
|
|
|
import django.db.models.deletion
|
2017-09-25 09:47:15 +02:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2017-09-25 09:47:15 +02:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2021-02-12 08:20:45 +01:00
|
|
|
("zerver", "0114_preregistrationuser_invited_as_admin"),
|
2017-09-25 09:47:15 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="UserGroup",
|
2017-09-25 09:47:15 +02:00
|
|
|
fields=[
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"id",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.AutoField(
|
2021-02-12 08:20:45 +01:00
|
|
|
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("name", models.CharField(max_length=100)),
|
2017-09-25 09:47:15 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="UserGroupMembership",
|
2017-09-25 09:47:15 +02:00
|
|
|
fields=[
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"id",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.AutoField(
|
2021-02-12 08:20:45 +01:00
|
|
|
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"user_group",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
2021-02-12 08:20:45 +01:00
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="zerver.UserGroup"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"user_profile",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
|
|
|
|
),
|
|
|
|
),
|
2017-09-25 09:47:15 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="usergroup",
|
|
|
|
name="members",
|
2021-02-12 08:19:30 +01:00
|
|
|
field=models.ManyToManyField(
|
2021-02-12 08:20:45 +01:00
|
|
|
through="zerver.UserGroupMembership", to=settings.AUTH_USER_MODEL
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="usergroup",
|
|
|
|
name="realm",
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="zerver.Realm"),
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="usergroupmembership",
|
|
|
|
unique_together={("user_group", "user_profile")},
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="usergroup",
|
|
|
|
unique_together={("realm", "name")},
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
]
|