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 = [
|
|
|
|
('zerver', '0114_preregistrationuser_invited_as_admin'),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='UserGroup',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('name', models.CharField(max_length=100)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='UserGroupMembership',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('user_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.UserGroup')),
|
|
|
|
('user_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='usergroup',
|
|
|
|
name='members',
|
|
|
|
field=models.ManyToManyField(through='zerver.UserGroupMembership', to=settings.AUTH_USER_MODEL),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='usergroup',
|
|
|
|
name='realm',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Realm'),
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='usergroupmembership',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('user_group', 'user_profile')},
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='usergroup',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('realm', 'name')},
|
2017-09-25 09:47:15 +02:00
|
|
|
),
|
|
|
|
]
|