2017-06-01 10:44:51 +02:00
|
|
|
import django.db.models.deletion
|
2016-07-29 21:52:45 +02:00
|
|
|
from django.conf import settings
|
2017-11-16 00:55:49 +01:00
|
|
|
from django.db import migrations, models
|
2016-07-29 21:52:45 +02:00
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2016-07-29 21:52:45 +02:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2016-10-06 23:25:55 +02:00
|
|
|
('zerver', '0030_realm_org_type'),
|
2016-07-29 21:52:45 +02:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Anomaly',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('info', models.CharField(max_length=1000)),
|
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='HuddleCount',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
2017-06-01 10:44:51 +02:00
|
|
|
('huddle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Recipient')),
|
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
2016-07-29 21:52:45 +02:00
|
|
|
('property', models.CharField(max_length=40)),
|
|
|
|
('end_time', models.DateTimeField()),
|
|
|
|
('interval', models.CharField(max_length=20)),
|
2016-10-06 23:25:55 +02:00
|
|
|
('value', models.BigIntegerField()),
|
2017-06-01 10:44:51 +02:00
|
|
|
('anomaly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Anomaly', null=True)),
|
2016-07-29 21:52:45 +02:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='InstallationCount',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('property', models.CharField(max_length=40)),
|
|
|
|
('end_time', models.DateTimeField()),
|
|
|
|
('interval', models.CharField(max_length=20)),
|
2016-10-06 23:25:55 +02:00
|
|
|
('value', models.BigIntegerField()),
|
2017-06-01 10:44:51 +02:00
|
|
|
('anomaly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Anomaly', null=True)),
|
2016-07-29 21:52:45 +02:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='RealmCount',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
2017-06-01 10:44:51 +02:00
|
|
|
('realm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Realm')),
|
2016-07-29 21:52:45 +02:00
|
|
|
('property', models.CharField(max_length=40)),
|
|
|
|
('end_time', models.DateTimeField()),
|
|
|
|
('interval', models.CharField(max_length=20)),
|
2016-10-06 23:25:55 +02:00
|
|
|
('value', models.BigIntegerField()),
|
2017-06-01 10:44:51 +02:00
|
|
|
('anomaly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Anomaly', null=True)),
|
2016-10-06 23:25:55 +02:00
|
|
|
|
2016-07-29 21:52:45 +02:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='StreamCount',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
2017-06-01 10:44:51 +02:00
|
|
|
('realm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Realm')),
|
|
|
|
('stream', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Stream')),
|
2016-07-29 21:52:45 +02:00
|
|
|
('property', models.CharField(max_length=40)),
|
|
|
|
('end_time', models.DateTimeField()),
|
|
|
|
('interval', models.CharField(max_length=20)),
|
2016-10-06 23:25:55 +02:00
|
|
|
('value', models.BigIntegerField()),
|
2017-06-01 10:44:51 +02:00
|
|
|
('anomaly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Anomaly', null=True)),
|
2016-07-29 21:52:45 +02:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='UserCount',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
2017-06-01 10:44:51 +02:00
|
|
|
('realm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Realm')),
|
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
2016-07-29 21:52:45 +02:00
|
|
|
('property', models.CharField(max_length=40)),
|
|
|
|
('end_time', models.DateTimeField()),
|
|
|
|
('interval', models.CharField(max_length=20)),
|
2016-10-06 23:25:55 +02:00
|
|
|
('value', models.BigIntegerField()),
|
2017-06-01 10:44:51 +02:00
|
|
|
('anomaly', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='analytics.Anomaly', null=True)),
|
2016-07-29 21:52:45 +02:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='usercount',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('user', 'property', 'end_time', 'interval')},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='streamcount',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('stream', 'property', 'end_time', 'interval')},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='realmcount',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('realm', 'property', 'end_time', 'interval')},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='installationcount',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('property', 'end_time', 'interval')},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='huddlecount',
|
2020-04-09 21:51:58 +02:00
|
|
|
unique_together={('huddle', 'property', 'end_time', 'interval')},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
]
|