aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/migrations
diff options
context:
space:
mode:
authorGravatar Mark <[email protected]>2019-12-14 21:11:50 -0800
committerGravatar GitHub <[email protected]>2019-12-14 21:11:50 -0800
commit8d79d8962cf221e6859a32daf2079161e2e680b1 (patch)
treeb97f1e90ca46aa3f2ed4351c5a36bd892bd49d0b /pydis_site/apps/api/migrations
parentAdd 1em bottom margin to wiki markdown codeblocks. (diff)
parentRename route /bot/offensive-message to /bot/offensive-messages (diff)
Merge pull request #300 from python-discord/#222-offensive-msg-autodeletion
Create offensive message model for python-discord/bot#617
Diffstat (limited to 'pydis_site/apps/api/migrations')
-rw-r--r--pydis_site/apps/api/migrations/0049_offensivemessage.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0049_offensivemessage.py b/pydis_site/apps/api/migrations/0049_offensivemessage.py
new file mode 100644
index 00000000..fe4a1961
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0049_offensivemessage.py
@@ -0,0 +1,25 @@
+# Generated by Django 2.2.6 on 2019-11-07 18:08
+
+import django.core.validators
+from django.db import migrations, models
+import pydis_site.apps.api.models.bot.offensive_message
+import pydis_site.apps.api.models.utils
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0048_add_infractions_unique_constraints_active'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='OffensiveMessage',
+ fields=[
+ ('id', models.BigIntegerField(help_text='The message ID as taken from Discord.', primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(limit_value=0, message='Message IDs cannot be negative.')])),
+ ('channel_id', models.BigIntegerField(help_text='The channel ID that the message was sent in, taken from Discord.', validators=[django.core.validators.MinValueValidator(limit_value=0, message='Channel IDs cannot be negative.')])),
+ ('delete_date', models.DateTimeField(help_text='The date on which the message will be auto-deleted.', validators=[pydis_site.apps.api.models.bot.offensive_message.future_date_validator])),
+ ],
+ bases=(pydis_site.apps.api.models.utils.ModelReprMixin, models.Model),
+ ),
+ ]