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 = [
|
2021-02-12 08:20:45 +01:00
|
|
|
("zerver", "0030_realm_org_type"),
|
2016-07-29 21:52:45 +02:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="Anomaly",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("info", models.CharField(max_length=1000)),
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="HuddleCount",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"huddle",
|
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.Recipient"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"user",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
|
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("property", models.CharField(max_length=40)),
|
|
|
|
("end_time", models.DateTimeField()),
|
|
|
|
("interval", models.CharField(max_length=20)),
|
|
|
|
("value", models.BigIntegerField()),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="analytics.Anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="InstallationCount",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("property", models.CharField(max_length=40)),
|
|
|
|
("end_time", models.DateTimeField()),
|
|
|
|
("interval", models.CharField(max_length=20)),
|
|
|
|
("value", models.BigIntegerField()),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="analytics.Anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="RealmCount",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"realm",
|
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.Realm"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("property", models.CharField(max_length=40)),
|
|
|
|
("end_time", models.DateTimeField()),
|
|
|
|
("interval", models.CharField(max_length=20)),
|
|
|
|
("value", models.BigIntegerField()),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="analytics.Anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="StreamCount",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"realm",
|
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.Realm"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"stream",
|
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.Stream"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("property", models.CharField(max_length=40)),
|
|
|
|
("end_time", models.DateTimeField()),
|
|
|
|
("interval", models.CharField(max_length=20)),
|
|
|
|
("value", models.BigIntegerField()),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="analytics.Anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="UserCount",
|
2016-07-29 21:52:45 +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
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"realm",
|
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.Realm"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"user",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
|
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("property", models.CharField(max_length=40)),
|
|
|
|
("end_time", models.DateTimeField()),
|
|
|
|
("interval", models.CharField(max_length=20)),
|
|
|
|
("value", models.BigIntegerField()),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="analytics.Anomaly",
|
2021-02-12 08:19:30 +01:00
|
|
|
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(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="usercount",
|
|
|
|
unique_together={("user", "property", "end_time", "interval")},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="streamcount",
|
|
|
|
unique_together={("stream", "property", "end_time", "interval")},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="realmcount",
|
|
|
|
unique_together={("realm", "property", "end_time", "interval")},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="installationcount",
|
|
|
|
unique_together={("property", "end_time", "interval")},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="huddlecount",
|
|
|
|
unique_together={("huddle", "property", "end_time", "interval")},
|
2016-07-29 21:52:45 +02:00
|
|
|
),
|
|
|
|
]
|