2016-11-01 11:26:38 +01:00
|
|
|
# Generated by Django 1.10.5 on 2017-03-26 01:10
|
|
|
|
import bitfield.models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import django.utils.timezone
|
2017-11-16 00:44:00 +01:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
2016-11-01 11:26:38 +01:00
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2016-11-01 11:26:38 +01:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
2021-02-12 08:20:45 +01:00
|
|
|
("zerver", "0066_realm_inline_url_embed_preview"),
|
2016-11-01 11:26:38 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="ArchivedAttachment",
|
2016-11-01 11:26:38 +01: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
|
|
|
("file_name", models.TextField(db_index=True)),
|
|
|
|
("path_id", models.TextField(db_index=True)),
|
|
|
|
("is_realm_public", models.BooleanField(default=False)),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"create_time",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.DateTimeField(db_index=True, default=django.utils.timezone.now),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("size", models.IntegerField(null=True)),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"archive_timestamp",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.DateTimeField(db_index=True, default=django.utils.timezone.now),
|
|
|
|
),
|
2016-11-01 11:26:38 +01:00
|
|
|
],
|
|
|
|
options={
|
2021-02-12 08:20:45 +01:00
|
|
|
"abstract": False,
|
2016-11-01 11:26:38 +01:00
|
|
|
},
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="ArchivedMessage",
|
2016-11-01 11:26:38 +01: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
|
|
|
("subject", models.CharField(db_index=True, max_length=60)),
|
|
|
|
("content", models.TextField()),
|
|
|
|
("rendered_content", models.TextField(null=True)),
|
|
|
|
("rendered_content_version", models.IntegerField(null=True)),
|
|
|
|
("pub_date", models.DateTimeField(db_index=True, verbose_name="date published")),
|
|
|
|
("last_edit_time", models.DateTimeField(null=True)),
|
|
|
|
("edit_history", models.TextField(null=True)),
|
|
|
|
("has_attachment", models.BooleanField(db_index=True, default=False)),
|
|
|
|
("has_image", models.BooleanField(db_index=True, default=False)),
|
|
|
|
("has_link", models.BooleanField(db_index=True, default=False)),
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"archive_timestamp",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.DateTimeField(db_index=True, default=django.utils.timezone.now),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"recipient",
|
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
|
|
|
"sender",
|
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
|
|
|
"sending_client",
|
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.Client"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2016-11-01 11:26:38 +01:00
|
|
|
],
|
|
|
|
options={
|
2021-02-12 08:20:45 +01:00
|
|
|
"abstract": False,
|
2016-11-01 11:26:38 +01:00
|
|
|
},
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="ArchivedUserMessage",
|
2016-11-01 11:26:38 +01: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
|
|
|
"flags",
|
2021-02-12 08:19:30 +01:00
|
|
|
bitfield.models.BitField(
|
|
|
|
[
|
2021-02-12 08:20:45 +01:00
|
|
|
"read",
|
|
|
|
"starred",
|
|
|
|
"collapsed",
|
|
|
|
"mentioned",
|
|
|
|
"wildcard_mentioned",
|
|
|
|
"summarize_in_home",
|
|
|
|
"summarize_in_stream",
|
|
|
|
"force_expand",
|
|
|
|
"force_collapse",
|
|
|
|
"has_alert_word",
|
|
|
|
"historical",
|
|
|
|
"is_me_message",
|
2021-02-12 08:19:30 +01:00
|
|
|
],
|
|
|
|
default=0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"archive_timestamp",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.DateTimeField(db_index=True, default=django.utils.timezone.now),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"message",
|
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.ArchivedMessage"
|
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
|
|
|
|
),
|
|
|
|
),
|
2016-11-01 11:26:38 +01:00
|
|
|
],
|
|
|
|
options={
|
2021-02-12 08:20:45 +01:00
|
|
|
"abstract": False,
|
2016-11-01 11:26:38 +01:00
|
|
|
},
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="archivedattachment",
|
|
|
|
name="messages",
|
|
|
|
field=models.ManyToManyField(to="zerver.ArchivedMessage"),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="archivedattachment",
|
|
|
|
name="owner",
|
2021-02-12 08:19:30 +01:00
|
|
|
field=models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
|
|
|
|
),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="archivedattachment",
|
|
|
|
name="realm",
|
2021-02-12 08:19:30 +01:00
|
|
|
field=models.ForeignKey(
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2021-02-12 08:20:45 +01:00
|
|
|
to="zerver.Realm",
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="archivedusermessage",
|
|
|
|
unique_together={("user_profile", "message")},
|
2016-11-01 11:26:38 +01:00
|
|
|
),
|
|
|
|
]
|